1 Star 0 Fork 34

elearns/Pear Admin Vue

forked from Pear Admin/Pear Admin Vue 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 917 Bytes
一键复制 编辑 原始数据 按行查看 历史
落小梅 提交于 2021-02-20 17:34 . update: preivew build remove source map
/* eslint-disable */
const createThemeColorReplacerPlugin = require('./src/themes/themeConfig.js')
const path = require('path')
const fs = require('fs')
const lessToJs = require('less-vars-to-js')
const themeVariables = lessToJs(fs.readFileSync(path.join(__dirname, './src/themes/pear-theme-vars.less'), 'utf8'))
const config = {
publicPath: '/',
css: {
loaderOptions: {
less: {
modifyVars: themeVariables,
javascriptEnabled: true
}
},
requireModuleExtension: true
},
configureWebpack: {
plugins: []
},
devServer: {
open: true,
port: 3000,
disableHostCheck: true
},
productionSourceMap: false,
parallel: require('os').cpus().length > 1 // 构建时开启多进程处理babel编译
}
if (process.env.VUE_APP_PEAR_VIEW === 'true') {
config.configureWebpack.plugins.push(
createThemeColorReplacerPlugin()
)
}
module.exports = config
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/elearns/pear-admin-vue.git
git@gitee.com:elearns/pear-admin-vue.git
elearns
pear-admin-vue
Pear Admin Vue
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385