1 Star 0 Fork 0

Mitscherlich/hexo-theme-amber

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 1.86 KB
一键复制 编辑 原始数据 按行查看 历史
Mitscherlich 提交于 2019-01-31 21:25 +08:00 . :lipstick:Update some components style
const path = require('path')
const merge = require('lodash.merge')
const isDev = !(process.env.NODE_ENV === 'production');
const config = {
outputDir: 'source',
productionSourceMap: false,
indexPath: path.relative('source', 'layout/index.ejs')
}
const proxy = {
'/api': {
'target': 'http://localhost:4000/api',
'changeOrigin': true,
'pathRewrite': { '^/api': '' },
},
'/assets': {
'target': 'http://localhost:4000/assets',
'changeOrigin': true,
'pathRewrite': { '^/assets': '' },
}
}
const dev = {
devServer: { proxy }
}
const prod = {
pwa: { themeColor: '#ffffff', msTileColor: '#ffffff' },
configureWebpack: {
optimization: {
splitChunks: {
cacheGroups: {
bootstrap: {
name: 'chunk-bootstrap',
test: /[\\/]node_modules\/bootstrap[\\/]/,
chunks: 'all',
reuseExistingChunk: true,
enforce: true
},
bootstrapVue: {
name: 'chunk-bootstrap-vue',
test: /[\\/]node_modules\/bootstrap-vue[\\/]/,
chunks: 'all',
reuseExistingChunk: true,
enforce: true
},
fontAwesome: {
name: 'chunk-font-awesome',
test: /[\\/]node_modules\/@fortawesome[\\/]/,
chunks: 'all',
reuseExistingChunk: true,
enforce: true
},
markdownIt: {
name: 'chunk-markdown-it',
test: /[\\/]node_modules\/markdown-it[\\/]/,
chunks: 'all',
reuseExistingChunk: true,
enforce: true
},
vue: {
name: 'chunk-vue',
test: /[\\/]node_modules\/vue[\\/]/,
chunks: 'all',
reuseExistingChunk: true,
enforce: true
}
}
}
}
}
}
module.exports = merge(config, isDev ? dev: prod)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/Mitscherlich/hexo-theme-amber.git
[email protected]:Mitscherlich/hexo-theme-amber.git
Mitscherlich
hexo-theme-amber
hexo-theme-amber
0.x

搜索帮助