Created
January 24, 2017 18:42
-
-
Save sortofsleepy/cc18e2c013d4623cd3169b01bb1ede9e to your computer and use it in GitHub Desktop.
Shows webpack 2 hot reload working (adjust as necessary)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// configuration. Pass in your the path to your own file or it defaults to a default one | |
config = { | |
entry: default_entries, | |
performance:{ | |
hints:false | |
}, | |
output:{ | |
path:OUTPUT, | |
filename:"app.js", | |
publicPath:"/" | |
}, | |
module:{ | |
loaders:[ | |
{ | |
test:/\.js$/, | |
exclude:/node_modules/, | |
loaders:[ | |
__dirname + '/node_modules/babel-loader' | |
] | |
} | |
] | |
}, | |
plugins: [ | |
new webpack.HotModuleReplacementPlugin(), | |
new webpack.NamedModulesPlugin() | |
] | |
} | |
/// SERVER | |
var server = new WebpackServer(compiler,{ | |
hot:HOTLOAD, | |
noInfo:true, | |
contentBase:path.resolve(`${__dirname}/../`,DIST), | |
publicPath:"/", | |
stats:{ | |
errors:true, | |
hash:false, | |
version:false, | |
assets:false, | |
timings:false, | |
chunks:false | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment