Skip to content

Commit

Permalink
Make mill support themes.
Browse files Browse the repository at this point in the history
  • Loading branch information
xeodou committed Apr 18, 2016
1 parent bac4ac2 commit 9ca8b58
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ module.exports = {
'webpack/hot/only-dev-server',
path.resolve(__dirname, './src/app'),
],
vendor: ["history", "qs", "react", "react-dom","react-router","whatwg-fetch"]
},
output: {
filename: 'mill.min.js',
path: path.join(__dirname, '.'),
publicPath: 'https://localhost:4000/assets/',
},
resolve: {
extensions: ['', '.js', '.jsx'],
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [{
Expand All @@ -38,11 +39,13 @@ module.exports = {
query: {
presets: ['react', 'es2015', 'stage-0'],
},
}],
}]
},
plugins: [
new webpack.IgnorePlugin(/themes/),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.optimize.CommonsChunkPlugin("vendor", "vendor.bundle.js"),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
warning: false,
Expand Down
8 changes: 6 additions & 2 deletions webpack.config.production.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ const path = require('path');

module.exports = {
devtool: 'source-map',
entry: './src/app.jsx',
entry: {
app: './src/app.jsx',
vendor: ["history", "qs", "react", "react-dom","react-router","whatwg-fetch"]
},
output: {
filename: 'mill.min.js',
path: path.join(__dirname, '.'),
Expand All @@ -35,8 +38,9 @@ module.exports = {
}],
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin(/themes/),
new webpack.NoErrorsPlugin(),
new webpack.optimize.CommonsChunkPlugin("vendor", "vendor.bundle.js"),
new webpack.optimize.UglifyJsPlugin(),
new webpack.DefinePlugin({
'process.env': {
Expand Down

0 comments on commit 9ca8b58

Please sign in to comment.