Showing
4 changed files
with
5 additions
and
6 deletions
@@ -11,7 +11,7 @@ var webpackConfig = require('./webpack.prod.conf') | @@ -11,7 +11,7 @@ var webpackConfig = require('./webpack.prod.conf') | ||
11 | var spinner = ora('building for production...') | 11 | var spinner = ora('building for production...') |
12 | spinner.start() | 12 | spinner.start() |
13 | 13 | ||
14 | -rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { | 14 | +rm(path.join(config.build.assetsRoot), err => { |
15 | if (err) throw err | 15 | if (err) throw err |
16 | webpack(webpackConfig, function (err, stats) { | 16 | webpack(webpackConfig, function (err, stats) { |
17 | spinner.stop() | 17 | spinner.stop() |
@@ -6,10 +6,10 @@ module.exports = { | @@ -6,10 +6,10 @@ module.exports = { | ||
6 | env: { | 6 | env: { |
7 | NODE_ENV: '"production"' | 7 | NODE_ENV: '"production"' |
8 | }, | 8 | }, |
9 | - index: path.resolve(__dirname, `./bundle/${pkg.version}/index.html`), | ||
10 | - assetsRoot: path.resolve(__dirname, './bundle'), | 9 | + index: path.resolve(__dirname, `../../public/dist/${pkg.name}/${pkg.version}/index.html`), |
10 | + assetsRoot: path.resolve(__dirname, `../../public/dist/${pkg.name}/`), | ||
11 | assetsSubDirectory: 'static', | 11 | assetsSubDirectory: 'static', |
12 | - assetsPublicPath: 'https://cdn.yoho.cn/yoho-shop-manage/', | 12 | + assetsPublicPath: '//cdn.yoho.cn/yoho-shop-manage/', |
13 | productionSourceMap: true, | 13 | productionSourceMap: true, |
14 | productionGzip: false, | 14 | productionGzip: false, |
15 | productionGzipExtensions: ['js', 'css'], | 15 | productionGzipExtensions: ['js', 'css'], |
@@ -17,7 +17,6 @@ var webpackConfig = merge(baseConfig, { | @@ -17,7 +17,6 @@ var webpackConfig = merge(baseConfig, { | ||
17 | }, | 17 | }, |
18 | devtool: config.build.productionSourceMap ? '#source-map' : false, | 18 | devtool: config.build.productionSourceMap ? '#source-map' : false, |
19 | output: { | 19 | output: { |
20 | - path: config.build.assetsRoot, | ||
21 | filename: utils.assetsPath('js/[name].[chunkhash:7].js'), | 20 | filename: utils.assetsPath('js/[name].[chunkhash:7].js'), |
22 | chunkFilename: utils.assetsPath('js/[name].[chunkhash:7].js') | 21 | chunkFilename: utils.assetsPath('js/[name].[chunkhash:7].js') |
23 | }, | 22 | }, |
-
Please register or login to post a comment