|
@@ -35,20 +35,20 @@ module.exports = {
|
|
|
},
|
|
},
|
|
|
publicPath: process.env.NODE_ENV === 'production' ? '/studenting/' : '/',// /studata/ 生产环境(打包后)使用目标路径;/ 开发环境(npm run serve)使用根路径,不影响本地开发
|
|
publicPath: process.env.NODE_ENV === 'production' ? '/studenting/' : '/',// /studata/ 生产环境(打包后)使用目标路径;/ 开发环境(npm run serve)使用根路径,不影响本地开发
|
|
|
configureWebpack: {
|
|
configureWebpack: {
|
|
|
- optimization: {
|
|
|
|
|
- minimize: true,
|
|
|
|
|
- minimizer: [
|
|
|
|
|
- new TerserPlugin({
|
|
|
|
|
- terserOptions: {
|
|
|
|
|
- compress: {
|
|
|
|
|
- drop_console: process.env.NODE_ENV === 'production', // 只在生产环境移除 console
|
|
|
|
|
- drop_debugger: process.env.NODE_ENV === 'production', // 只在生产环境移除 debugger
|
|
|
|
|
- pure_funcs: process.env.NODE_ENV === 'production' ? ['console.log', 'console.info', 'console.warn', 'console.error'] : [],
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- }),
|
|
|
|
|
- ],
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // optimization: {
|
|
|
|
|
+ // minimize: true,
|
|
|
|
|
+ // minimizer: [
|
|
|
|
|
+ // new TerserPlugin({
|
|
|
|
|
+ // terserOptions: {
|
|
|
|
|
+ // compress: {
|
|
|
|
|
+ // drop_console: process.env.NODE_ENV === 'production', // 只在生产环境移除 console
|
|
|
|
|
+ // drop_debugger: process.env.NODE_ENV === 'production', // 只在生产环境移除 debugger
|
|
|
|
|
+ // pure_funcs: process.env.NODE_ENV === 'production' ? ['console.log', 'console.info', 'console.warn', 'console.error'] : [],
|
|
|
|
|
+ // },
|
|
|
|
|
+ // },
|
|
|
|
|
+ // }),
|
|
|
|
|
+ // ],
|
|
|
|
|
+ // },
|
|
|
name: "教学管理大数据平台",
|
|
name: "教学管理大数据平台",
|
|
|
// devtool: "source-map",
|
|
// devtool: "source-map",
|
|
|
// entry:'./public/index.html',
|
|
// entry:'./public/index.html',
|
|
@@ -68,7 +68,7 @@ module.exports = {
|
|
|
],
|
|
],
|
|
|
},
|
|
},
|
|
|
// productionSourceMap: process.env.NODE_ENV !== 'production',
|
|
// productionSourceMap: process.env.NODE_ENV !== 'production',
|
|
|
- productionSourceMap: false, // 生产环境关闭 sourceMap
|
|
|
|
|
|
|
+ productionSourceMap: true, // 生产环境关闭 sourceMap
|
|
|
css: {
|
|
css: {
|
|
|
extract: false,
|
|
extract: false,
|
|
|
loaderOptions: {
|
|
loaderOptions: {
|