Skip to content

Commit 07e3d02

Browse files
committed
feat(build): Added webpack assets plugin for production build
Webpack Assets Plugin allows to keep track of dist files with hash names
1 parent 1d4edc0 commit 07e3d02

File tree

3 files changed

+235
-128
lines changed

3 files changed

+235
-128
lines changed

config/webpack.config.prod.js

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const paths = require('../config/paths');
44
const HtmlWebpackPlugin = require('html-webpack-plugin');
55
const ExtractTextPlugin = require('extract-text-webpack-plugin');
66
const CleanWebpackPlugin = require('clean-webpack-plugin');
7+
const AssetsPlugin = require('assets-webpack-plugin');
78
const getClientEnvironment = require('./env');
89

910
const root = process.cwd();
@@ -88,6 +89,9 @@ module.exports = {
8889
];
8990
},
9091
plugins: [
92+
93+
new AssetsPlugin({ path: paths.dist }),
94+
9195
new webpack.DefinePlugin(getClientEnvironment()),
9296

9397
// Remove the content of the ./dist/ folder.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"README.md"
4141
],
4242
"dependencies": {
43+
"assets-webpack-plugin": "^3.5.0",
4344
"autoprefixer": "6.5.4",
4445
"bluebird": "3.4.6",
4546
"chalk": "1.1.3",

0 commit comments

Comments
 (0)