I'm currently testing the Moden web test Runner and trying to use @web/dev-server-esbuild to build my tests written in TypeScript. Unfortunately it seems as if the import alias defined in @web/dev-server-esbuild are not properly processed.
A quick look into the source code of @web/dev-server-esbuild suggests that the function resolveImport in EsbuildPlugin.ts skips to entirely process all files that does not start with . to only handle relative imports, but does this before having resolved the alias and therefore missing the import using an alias.
if (!source.endsWith('.js') || !source.startsWith('.')) {
// only handle relative imports
return;
}
I'm currently testing the Moden web test Runner and trying to use
@web/dev-server-esbuild
to build my tests written in TypeScript. Unfortunately it seems as if the import alias defined in@web/dev-server-esbuild
are not properly processed.A quick look into the source code of @web/dev-server-esbuild suggests that the function
resolveImport
inEsbuildPlugin.ts
skips to entirely process all files that does not start with.
to only handle relative imports, but does this before having resolved the alias and therefore missing the import using an alias.