publicPath from webpack.config.js to package.json

This commit is contained in:
pmg1989
2017-02-28 12:09:15 +08:00
parent 6466276d0b
commit cc77167efb
2 changed files with 3 additions and 9 deletions
+3 -3
View File
@@ -41,10 +41,10 @@
"watchjs": "^0.0.0"
},
"scripts": {
"start": "dora --plugins \"proxy,webpack,webpack-hmr,browser-history?index=/src/index.html\"",
"dev": "dora --plugins \"webpack,webpack-hmr,browser-history?index=/src/index.html\"",
"start": "dora --plugins \"proxy,webpack?publicPath=/,webpack-hmr,browser-history?index=/src/index.html\"",
"dev": "dora --plugins \"webpack?publicPath=/,webpack-hmr,browser-history?index=/src/index.html\"",
"lint": "eslint --fix --ext .js,.jsx src/components/layout",
"build": "atool-build"
"build": "atool-build --publicPath /"
},
"theme": "./src/theme.js",
"standard": {
-6
View File
@@ -20,12 +20,6 @@ module.exports = function (webpackConfig, env) {
webpackConfig.babel.plugins.push('dev-expression')
}
webpackConfig.output = {
path: path.join(__dirname, '../dist'),
filename: '[name].js',
publicPath: '/'
}
// Don't extract common.js and common.css
webpackConfig.plugins = webpackConfig.plugins.filter(function (plugin) {
return !(plugin instanceof webpack.optimize.CommonsChunkPlugin)