Skip to content

Commit 3ddb799

Browse files
committed
Add hard-source
1 parent 86247d0 commit 3ddb799

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636
"gsap": "^1.18.0",
3737
"gulp": "^3.9.0",
3838
"gulp-shell": "^0.5.2",
39+
"hard-source-webpack-plugin": "^0.3.9",
3940
"howler": "^2.0.2",
4041
"json-loader": "^0.5.4",
4142
"lodash": "^4.17.4",
43+
"node-object-hash": "^1.1.5",
4244
"pixi.js": "^4.3.4",
4345
"script-loader": "^0.7.0",
4446
"tween.js": "^16.6.0",

webpack.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
var path = require('path');
44
var webpack = require('webpack');
5+
var HardSourcePlugin = require('hard-source-webpack-plugin');
56

67
module.exports = {
78
context: __dirname,
@@ -46,5 +47,12 @@ module.exports = {
4647
port: 8080
4748
},
4849
plugins: [
50+
new HardSourcePlugin({
51+
cacheDirectory: '../node_modules/.cache/hardsource/[confighash]',
52+
recordsPath: '../node_modules/.cache/hardsource/[confighash]/records.json',
53+
configHash: function(webpackConfig) {
54+
return require('node-object-hash')().hash(webpackConfig);
55+
}
56+
})
4957
],
5058
};

0 commit comments

Comments
 (0)