From 3755693be0be520deaf92d566f7e5e00d71fdcf5 Mon Sep 17 00:00:00 2001 From: zhoudw <zhoudw@infobird.com> Date: Mon, 10 Jan 2022 15:50:59 +0800 Subject: [PATCH] 打包 --- config/index.js | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/config/index.js b/config/index.js index a59b0b0..1d92f03 100644 --- a/config/index.js +++ b/config/index.js @@ -50,18 +50,18 @@ build: { // Template for index.html - index: path.resolve(__dirname, '../dist/index.html'), + index: path.resolve(__dirname, '../dist/prod/index.html'), // Paths - assetsRoot: path.resolve(__dirname, '../dist'), + assetsRoot: path.resolve(__dirname, '../dist/prod/'), assetsSubDirectory: 'static', assetsPublicPath: '/', - + assetsStaticPath: path.resolve(__dirname, '../dist/'), //配置文件打包地址 /** * Source Maps */ - productionSourceMap: true, + productionSourceMap: false, // https://webpack.js.org/configuration/devtool/#production devtool: '#source-map', @@ -77,5 +77,17 @@ // `npm run build --report` // Set to `true` or `false` to always turn it on or off bundleAnalyzerReport: process.env.npm_config_report + }, + build_test: { + index: path.resolve(__dirname, '../dist/test/index.html'), + assetsRoot: path.resolve(__dirname, '../dist/test/'), + assetsSubDirectory: 'static', + assetsStaticPath: path.resolve(__dirname, '../dist/'), //配置文件打包地址 + }, + build_dev: { + index: path.resolve(__dirname, '../dist/dev/index.html'), + assetsRoot: path.resolve(__dirname, '../dist/dev/'), + assetsSubDirectory: 'static', + assetsStaticPath: path.resolve(__dirname, '../dist/'), //配置文件打包地址 } -} \ No newline at end of file +} -- Gitblit v1.8.0