1.修改H5的打包错误
This commit is contained in:
lin
2022-03-21 15:47:47 +08:00
parent 7145ea8c81
commit 55e070939c
5 changed files with 13 additions and 10 deletions

View File

@@ -20,6 +20,8 @@
"axios": "^0.19.2",
"core-js": "^3.6.5",
"fastclick": "^1.0.6",
"joi": "^17.6.0",
"join": "^3.0.0",
"js-cookie": "^2.2.1",
"lib-flexible": "^0.3.2",
"lodash": "^4.17.20",
@@ -27,19 +29,21 @@
"nprogress": "^0.2.0",
"regenerator-runtime": "^0.13.5",
"vant": "^2.11.1",
"vue": "^2.6.12",
"vue": "^3.2.31",
"vue-enum": "^1.0.5",
"vue-loader": "^17.0.0",
"vue-loading-overlay": "^3.4.2",
"vue-router": "^3.4.0",
"vuex": "^3.6.0"
},
"devDependencies": {
"@sentry/webpack-plugin": "^1.11.1",
"@sentry/webpack-plugin": "^1.18.8",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.2.31",
"babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.13.0",
"babel-plugin-transform-remove-console": "^6.9.4",

View File

@@ -11,6 +11,9 @@ const projectConfig = require('./src/config/index.js');
// 生产环境,测试和正式
const isProductionEnv = ['production'].includes(process.env.NODE_ENV);
const isProductionAppEnv = ['prod', 'pre'].includes(process.env.VUE_APP_ENV);
const addOptions = {
preserveWhitespace: true
}
module.exports = {
publicPath: projectConfig.publicPath,
@@ -93,7 +96,7 @@ module.exports = {
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.compilerOptions.preserveWhitespace = true;
options.compilerOptions = addOptions;
return options;
})
.end();