修改打包配置

This commit is contained in:
BianLzhaoMin 2024-07-16 18:00:59 +08:00
parent 5783dde87a
commit 0afc0cecb4
2 changed files with 31 additions and 30 deletions

View File

@ -4,7 +4,7 @@ const path = require('path')
var proxyUrl = var proxyUrl =
module.exports = { module.exports = {
dev: { dev: {
// Paths // Paths
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
@ -36,11 +36,11 @@ module.exports = {
// Paths // Paths
assetsRoot: path.resolve(__dirname, '../dist'), assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static01', assetsSubDirectory: 'static01',
assetsPublicPath: '/', assetsPublicPath: '/bigScrap',
productionSourceMap: false, productionSourceMap: false,
devtool: '#source-map', devtool: '#source-map',
productionGzip: false, productionGzip: false,
productionGzipExtensions: ['js', 'css'], productionGzipExtensions: ['js', 'css'],
bundleAnalyzerReport: process.env.npm_config_report bundleAnalyzerReport: process.env.npm_config_report
} }
} }

View File

@ -63,6 +63,7 @@ const routes = [
const router = new Router({ const router = new Router({
mode: 'history', mode: 'history',
routes, routes,
base: '/bigScrap'
}) })
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {