Files
json-schema-editor-vue/vue.config.js
2023-04-26 21:31:33 +08:00

28 lines
718 B
JavaScript

const LodashModuleReplacementPlugin = require("lodash-webpack-plugin")
const webpack = require('webpack')
const path = require('path')
module.exports = {
publicPath: './',
productionSourceMap: false,
pages: {
index: {
entry: 'examples/main.js',
template: 'public/index.html',
filename: 'index.html'
}
},
configureWebpack:{
plugins: [
new webpack.IgnorePlugin({
resourceRegExp: /^\.\/locale$/,
contextRegExp: /moment$/,
}),
]
},
chainWebpack(config) {
if(process.env.analyzer) config.plugin('webpack-report').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
config.plugin("loadshReplace").use(new LodashModuleReplacementPlugin())
}
}