parse ESM with javascript
luojunbang opened this issue · 1 comments
luojunbang commented
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
./utils.js
function loadConfig(){
/** ... */
try {
importESM = new Function("id", "return import(id);"); // it should parse default?
} catch (e) {
importESM = null;
}
Expected Behavior
How Do We Reproduce?
Please paste the results of npx webpack info
here, and mention other relevant information
alexander-akait commented
Sorry I don't undestand you, feel free to rewrite the problem and I will reopen