Authored by 陈峰

Merge branch 'master' into release/1.0

@@ -6,4 +6,4 @@ node_modules/ @@ -6,4 +6,4 @@ node_modules/
6 *.log 6 *.log
7 .eslintcache 7 .eslintcache
8 app/bundle 8 app/bundle
9 -server/public/*.html  
  9 +public/
@@ -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 },
1 { 1 {
2 "name": "yoho-shop-manage", 2 "name": "yoho-shop-manage",
3 - "version": "1.0.0", 3 + "version": "1.0.2",
4 "description": "", 4 "description": "",
5 "main": "app.js", 5 "main": "app.js",
6 "scripts": { 6 "scripts": {