1 Star 0 Fork 91

蒋志/gods-pen-admin

forked from ymm-tech/gods-pen-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 2.26 KB
一键复制 编辑 原始数据 按行查看 历史
王坤明 提交于 2019-11-01 17:02 . 初始化
const path = require('path')
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
const config = require('./src/config/index')
const configureWebpack = {
resolve: {
alias: {
'src': path.join(__dirname, 'src')
}
},
externals: {
'jQuery': 'jQuery',
'plupload': 'plupload',
},
module: {
rules: [{
test: /\.md$/,
use: [
{ loader: 'html-loader' },
{ loader: 'markdown-loader' }
]
}]
},
plugins: [new MonacoWebpackPlugin()]
}
if (process.env.NODE_ENV === 'production') {
configureWebpack.externals.vue = 'Vue'
configureWebpack.externals['vue-router'] = 'VueRouter'
configureWebpack.externals.vuex = 'Vuex'
}
module.exports = {
publicPath: '/' + config.ADMIN_NAME,
assetsDir: 'static',
outputDir: `dist/${config.ADMIN_NAME || 'admin'}`,
lintOnSave: process.env.NODE_ENV !== 'production',
productionSourceMap: process.env.NODE_ENV !== 'production',
pages: {
index: {
entry: './src/main.js',
filename: 'index.html',
template: './index.tpl',
title: config.ADMIN_TITLE,
hmid: config.BAIDU_TONGJI
},
login: {
entry: './src/login.js',
filename: 'login.html',
template: './login.tpl',
title: config.ADMIN_TITLE,
hmid: config.BAIDU_TONGJI
},
emailActive: {
entry: './src/emailActive.js',
filename: 'emailActive.html',
template: './emailActive.tpl',
title: config.ADMIN_TITLE,
hmid: config.BAIDU_TONGJI
},
updatePassword: {
entry: './src/updatePassword.js',
filename: 'updatePassword.html',
template: './updatePassword.tpl',
title: config.ADMIN_TITLE,
hmid: config.BAIDU_TONGJI
}
},
devServer: {
disableHostCheck: true,
port: 8567,
publicPath: '/',
},
configureWebpack: configureWebpack,
chainWebpack: config => {
config.plugins.delete('preload-index')
config.plugins.delete('prefetch-index')
config.plugin('define').tap(args => {
args[0]['process.env'].CODE_ENV = JSON.stringify(process.env.CODE_ENV)
return args
})
config.module
.rule('wasm')
.test(/\.wasm$/)
.use('file-loader')
.loader('file-loader')
.tap(options => {
return {
limit: 0
}
})
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/jcykm/gods-pen-admin.git
git@gitee.com:jcykm/gods-pen-admin.git
jcykm
gods-pen-admin
gods-pen-admin
master

搜索帮助