This commit is contained in:
万纯 2021-03-03 17:36:11 +08:00
commit 6e66c24be6
2 changed files with 7 additions and 1 deletions

View File

@ -65,7 +65,7 @@
"style-loader": "^2.0.0",
"url-loader": "^4.1.1",
"vue-loader": "^16.1.2",
"webpack": "^5.21.0",
"webpack": "^5.24.2",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-chain": "^6.5.1",
"webpack-dev-server": "^3.11.2",

View File

@ -163,6 +163,12 @@ export default async function getConfig({
});
// --------------- js -----------
// https://webpack.docschina.org/configuration/module/#resolve-fully-specified
webpackConfig.module
.rule('esm')
.test(/\.m?jsx?$/)
.resolve.set('fullySpecified', false);
webpackConfig.module
.rule('js')
.test(/\.(js|mjs|jsx)$/)