Since the .js file extension is frequently omitted in import statements, it would be nice if this plugin supported this.
As an example for this requirement, I currently need to bundle Elastic UI with my module. Their code base contains this dynamic import. More precisely, during the bundling process, the equivalent line 102 in their distribution is included. (Note that the use of simple string concatenation instead of template strings is discussed in #8.)
By adding an empty string to the transformExtensions parameter, this plugin recognizes Elastic UI's dynamic import statement and adds the target files to the produced ImportMap, but the ImportMap only contains keys with the file extension.
Since the
.js
file extension is frequently omitted in import statements, it would be nice if this plugin supported this.As an example for this requirement, I currently need to bundle Elastic UI with my module. Their code base contains this dynamic import. More precisely, during the bundling process, the equivalent line 102 in their distribution is included. (Note that the use of simple string concatenation instead of template strings is discussed in #8.)
By adding an empty string to the
transformExtensions
parameter, this plugin recognizes Elastic UI's dynamic import statement and adds the target files to the producedImportMap
, but theImportMap
only contains keys with the file extension.