1 Star 1 Fork 310

申名 / JwChat

forked from 四铢半两 / JwChat 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
四铢半两 提交于 2021-10-19 15:37 . + vue.config
const webpack = require('webpack');
const version = process.env.VERSION || require('./package.json').version;
const isProduction = process.env.NODE_ENV === 'production'
const utils = require('./build/utils.js')
const banner =
' JwChat.js v' +
version +
'\n' +
' (c) 2020-' +
new Date().getFullYear() +
' codeGI\n' +
' Released under the MIT License.\n';
module.exports = {
publicPath: './',
css: {
extract: false
},
//去除生产环境的 productionSourceMap
productionSourceMap: false,
configureWebpack: {
output: {
libraryExport: 'default',
libraryTarget: 'umd',
// library: 'JwChat',
umdNamedDefine: true,
// globalObject: 'typeof self !== \'undefined\' ? self : this',
},
plugins: [
new webpack.BannerPlugin(banner)
],
externals: isProduction? utils.externalModules: {}
},
chainWebpack: config => {
if(process.env.npm_lifecycle_event!=='lib') {
config.plugin('html').tap(opts => {
opts[0].cdnConfig = utils.cdnConfig, // cdn配置
opts[0].isExternal = isProduction //是否加载js,dev下默认不加载
return opts
})
}
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/name-application/chat.git
git@gitee.com:name-application/chat.git
name-application
chat
JwChat
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891