Closed t2ym closed 1 year ago
[non-js-imports] Importing ./directory/index.js via ./directory fails
import "./submodule"
"./submodule/index.js"
".../directory/index.js"
".../directory"
".../directory/index"
diff --git a/demo-config/config.js b/demo-config/config.js index c0c302ca..fdfce6af 100644 --- a/demo-config/config.js +++ b/demo-config/config.js @@ -761,6 +761,10 @@ class TargetConfig extends Injectable(Traceable(Configurable(GulpDefaultRegistry if (href.match(/[.](css|svg)[.]js$/)) { done(false, false); // skip processed JavaScripts }
[non-js-imports] Importing ./directory/index.js via ./directory fails
Root Cause
import "./submodule"
fails to import"./submodule/index.js"
as the import map entry is missingFix
".../directory/index.js"
is found, add an import map entry to resolve".../directory"
to".../directory/index.js"
".../directory/index"
is disabled, which should be a good practice