mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
fix: 修复引入package.json type 为 module 时,不加文件后缀名,导致模块找不到的问题
This commit is contained in:
parent
0a8381bec6
commit
239d223c8a
@ -65,7 +65,7 @@
|
|||||||
"style-loader": "^2.0.0",
|
"style-loader": "^2.0.0",
|
||||||
"url-loader": "^4.1.1",
|
"url-loader": "^4.1.1",
|
||||||
"vue-loader": "^16.1.2",
|
"vue-loader": "^16.1.2",
|
||||||
"webpack": "^5.21.0",
|
"webpack": "^5.24.2",
|
||||||
"webpack-bundle-analyzer": "^4.4.0",
|
"webpack-bundle-analyzer": "^4.4.0",
|
||||||
"webpack-chain": "^6.5.1",
|
"webpack-chain": "^6.5.1",
|
||||||
"webpack-dev-server": "^3.11.2",
|
"webpack-dev-server": "^3.11.2",
|
||||||
|
@ -163,6 +163,12 @@ export default async function getConfig({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// --------------- js -----------
|
// --------------- js -----------
|
||||||
|
// https://webpack.docschina.org/configuration/module/#resolve-fully-specified
|
||||||
|
webpackConfig.module
|
||||||
|
.rule('esm')
|
||||||
|
.test(/\.m?jsx?$/)
|
||||||
|
.resolve.set('fullySpecified', false);
|
||||||
|
|
||||||
webpackConfig.module
|
webpackConfig.module
|
||||||
.rule('js')
|
.rule('js')
|
||||||
.test(/\.(js|mjs|jsx)$/)
|
.test(/\.(js|mjs|jsx)$/)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user