Skip to content

Commit

Permalink
Merge pull request #26 from MattSurabian/hard-source
Browse files Browse the repository at this point in the history
Add hard-source
  • Loading branch information
MattSurabian authored Feb 4, 2017
2 parents 86247d0 + bd48476 commit 19e448f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@
"gsap": "^1.18.0",
"gulp": "^3.9.0",
"gulp-shell": "^0.5.2",
"hard-source-webpack-plugin": "^0.3.9",
"howler": "^2.0.2",
"json-loader": "^0.5.4",
"lodash": "^4.17.4",
"node-object-hash": "^1.1.5",
"pixi.js": "^4.3.4",
"script-loader": "^0.7.0",
"tween.js": "^16.6.0",
"webpack": "^2.2.1",
"webpack-dev-server": "^1.16.3"
"webpack-dev-server": "^2.3.0"
}
}
10 changes: 9 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

var path = require('path');
var webpack = require('webpack');
var HardSourcePlugin = require('hard-source-webpack-plugin');

module.exports = {
context: __dirname,
entry: {
duckhunt: './main.js',
},
output: {
path: 'dist',
path: path.join(__dirname, 'dist'),
filename: '[name].js',
},
devtool: 'source-map',
Expand Down Expand Up @@ -46,5 +47,12 @@ module.exports = {
port: 8080
},
plugins: [
new HardSourcePlugin({
cacheDirectory: '../node_modules/.cache/hardsource/[confighash]',
recordsPath: '../node_modules/.cache/hardsource/[confighash]/records.json',
configHash: function(webpackConfig) {
return require('node-object-hash')().hash(webpackConfig);
}
})
],
};

0 comments on commit 19e448f

Please sign in to comment.