A path-alias import of a dotted TypeScript file (~/cats/cat.service)
must keep the dotted name, but an alias import of a non-JS file
(~/styles/globals.css, ~/styles.css?url) must still drop its extension,
as it does on main. Keeping every extension sent the CSS imports away
from their module nodes.
The alias branch of cbm_pipeline_resolve_module now decides from the
file path, because filename dots and path separators both become dots
in a qualified name:
- an explicit JS/TS or JSON extension names its module;
- a module at exactly the imported path wins (styles.css, also beside
styles.css.ts or styles/css.ts);
- else a dotted-name module at that path plus a module extension wins
(theme.css.ts imported as ~/theme.css);
- else the extension drops, as on main.
A bundler ?query and a #fragment are cut before the extension is read.
The shared alias resolver in path_alias.c is back to main's behaviour,
so doc links keep the file identity they had.
Refs #514
Signed-off-by: chidev <chicagowebdev@gmail.com>