代码拉取完成,页面将自动刷新
const path = require('path')
function resolve (dir) {
return path.join(__dirname, dir)
}
const entrys = ['home', 'about', 'archives', 'article', 'category', 'tags']
module.exports = {
pages: {
admin: {
// 入口js的路径
entry: './webapp/admin',
// 页面模板路径
template: './static/admin.html',
filename: 'jyx-admin/admin.html'
}
},
chainWebpack: (config) => {
entrys.forEach((entry)=>{
config.entry(entry).add(`./webapp/${entry}.js`).end()
})
config.output.filename('js/[name].js')
// config.resolve.alias.set('@view', resolve('src/view'))
config.resolve.alias.set('@', resolve('webapp'))
// config.optimization.runtimeChunk({name: 'runtime'})
// vendors: {
// name: `chunk-vendors`,
// test: /[\\/]node_modules[\\/]/,
// priority: -10,
// chunks: 'initial'
// },
// common: {
// name: `chunk-common`,
// minChunks: 2,
// priority: -20,
// chunks: 'initial',
// reuseExistingChunk: true
// }
config.optimization.splitChunks({cacheGroups: {}})
},
lintOnSave: undefined,
baseUrl: undefined,
outputDir: undefined,
assetsDir: undefined,
runtimeCompiler: undefined,
productionSourceMap: false,
parallel: undefined,
filenameHashing: false
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。