|
@@ -54,10 +54,9 @@ function addStyleResource(rule) {
|
|
|
patterns: [
|
|
|
resolve('src/assets/styles/common/common.less')
|
|
|
]
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
-
|
|
|
module.exports = {
|
|
|
|
|
|
publicPath: "./", // 默认'/',部署应用包时的基本 URL
|
|
@@ -67,6 +66,23 @@ module.exports = {
|
|
|
lintOnSave: false, // 是否在开发环境下通过 eslint-loader 在每次保存时 lint 代码
|
|
|
runtimeCompiler: true, // 是否使用包含运行时编译器的 Vue 构建版本
|
|
|
|
|
|
+ configureWebpack: {
|
|
|
+ module: {
|
|
|
+
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ test: /\.js$/,
|
|
|
+ loader: "@open-wc/webpack-import-meta-loader"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ test: /\.mjs$/,
|
|
|
+ include: /node_modules/,
|
|
|
+ type: "javascript/auto"
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
chainWebpack: (config) => {
|
|
|
config.resolve.symlinks(true); // 修复热更新失效
|
|
|
config.plugin('html')
|
|
@@ -95,6 +111,9 @@ module.exports = {
|
|
|
.use('@open-wc/webpack-import-meta-loader')
|
|
|
.loader('@open-wc/webpack-import-meta-loader');
|
|
|
|
|
|
+ // const elementPlusMjs = config.module.rule('elementPlusMjs');
|
|
|
+ // elementPlusMjs.test(/\.mjs$/).include.add(resolve('/node_modules')).end();
|
|
|
+
|
|
|
// svg雪碧图 不去除fill属性
|
|
|
// const svgRuleFill = config.module.rule('icons_fill');
|
|
|
// svgRuleFill.test(/\.svg$/)
|