1 Star 1 Fork 1

一如既往 / element-ui-components

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 876 Bytes
一键复制 编辑 原始数据 按行查看 历史
一如既往 提交于 2023-12-13 16:10 . 修复错误
const resolve = dir => require("path").join(__dirname, dir);
const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
lintOnSave: true,
productionSourceMap: false,
configureWebpack() {
let config = {
plugins: [
new CopyWebpackPlugin([
{
from: './*',
to: path.join(__dirname, './publish/'),
ignore: ['package-lock.json']
}
])
],
externals: process.env.NODE_ENV === 'production' ?
{
'vue': 'vue',
'element-ui': 'element-ui',
'lodash': 'lodash'
} : {}
}
return config;
},
chainWebpack: config => {
config.plugins.delete("prefetch").delete("preload");
config.resolve.symlinks(true);
// 重新设置 alias
config.resolve.alias.set("~", resolve("public")).end();
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/han1982/element-ui-components.git
git@gitee.com:han1982/element-ui-components.git
han1982
element-ui-components
element-ui-components
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891