Skip to content

Commit

Permalink
feat(build): Added webpack assets plugin for production build
Browse files Browse the repository at this point in the history
Webpack Assets Plugin allows to keep track of dist files with hash names
  • Loading branch information
halfzebra committed Jan 15, 2017
1 parent 1d4edc0 commit 07e3d02
Show file tree
Hide file tree
Showing 3 changed files with 235 additions and 128 deletions.
4 changes: 4 additions & 0 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const paths = require('../config/paths');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const AssetsPlugin = require('assets-webpack-plugin');
const getClientEnvironment = require('./env');

const root = process.cwd();
Expand Down Expand Up @@ -88,6 +89,9 @@ module.exports = {
];
},
plugins: [

new AssetsPlugin({ path: paths.dist }),

new webpack.DefinePlugin(getClientEnvironment()),

// Remove the content of the ./dist/ folder.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"README.md"
],
"dependencies": {
"assets-webpack-plugin": "^3.5.0",
"autoprefixer": "6.5.4",
"bluebird": "3.4.6",
"chalk": "1.1.3",
Expand Down
Loading

0 comments on commit 07e3d02

Please sign in to comment.