代码拉取完成,页面将自动刷新
同步操作将从 轻云吻雪/vue-data-view 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
let fs =require('fs')
let path =require('path')
const CompressionWebpackPlugin = require('compression-webpack-plugin')
const MonacoEditorPlugin = require('monaco-editor-webpack-plugin')
const productionGzipExtensions = ['js', 'css']
function resolve(name){
return __dirname + '/' + name
}
module.exports = {
assetsDir:"static",
pages:{
index:{
entry:'client/main.js',
template:'public/engine-h5-long.html',
filename:'index.html'
}
},
devServer: {
proxy: {
'/': {
target: 'http://localhost:4000',
ws: false,
changeOrigin: true,
pathRewrite:{}
}
}
},
css:{
loaderOptions:{
sass:{
data:fs.readFileSync(path.resolve(__dirname,'./client/common/styles/variables.scss'),'utf-8')
}
}
},
productionSourceMap:process.env.NODE_ENV !=='production',
configureWebpack:config=>{
if(process.env.NODE_ENV === 'production'){
config.plugins.push(
new CompressionWebpackPlugin({
filename:'[path].gz[query]',
algorithm:'gzip',
test:new RegExp('\\.('+productionGzipExtensions.join('|')+')$'),
threshold:10240,
minRatio:0.8
})
)
}
else{
}
config.plugins.push(new MonacoEditorPlugin({
// https://github.com/Microsoft/monaco-editor-webpack-plugin#options
// Include a subset of languages support
// Some language extensions like typescript are so huge that may impact build performance
// e.g. Build full languages support with webpack 4.0 takes over 80 seconds
// Languages are loaded on demand at runtime
//'javascript', 'css', 'html', 'typescript',
languages: [ 'json', 'sql', 'javascript']
}))
},
chainWebpack: config=>{
config.resolve.alias
.set('@',path.resolve('client'))
.set('@client',path.resolve('client'))
.set('@plugins',path.resolve('plugins'))
.set('@server',path.resolve('server'))
config.module
.rule('js')
.include.add(/engine-template/).end()
.include.add(/client/).end()
.include.add(/common/).end()
.use('babel')
.loader('babel-loader')
.tap(options=>{
return options
})
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。