我收到一个错误 Uncaught ReferenceError: require is not defined at Object.babel-polyfill at webpack_require
我正在将模块与 webpack 捆绑在一起,并且在遵循文档 https://babeljs.io/docs/en/babel-preset-env#modules 之后,我明白所需的操作是 module: "auto"
。
但无法使其工作。
这是我的 .babelrc
"presets":[
["@babel/preset-env",{
"targets":{
"browsers":[
"last 5 versions",
"ie >= 10"
],
"esmodules": true
}
}
]
],
"plugins": ["@babel/plugin-transform-runtime","dynamic-import-node"]
}```
Help me solve the issue!!