Closed luojunbang closed 11 months ago
parse ESM with Javascript
using .mts , it can interopDefault, but using .mjs ,it can not be export default
the config can not be function
./utils.js function loadConfig(){ /** ... */ try { importESM = new Function("id", "return import(id);"); // it should parse default? } catch (e) { importESM = null; }
npx webpack info
Sorry I don't undestand you, feel free to rewrite the problem and I will reopen
Bug report
parse ESM with Javascript
Actual Behavior
using .mts , it can interopDefault, but using .mjs ,it can not be export default
the config can not be function
Expected Behavior
How Do We Reproduce?
Please paste the results of
npx webpack info
here, and mention other relevant information