Commit 7d31a186 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

Enabled hot reload for webpack

parent 268a2e99
{
"presets": [
["latest", {"modules": false}]
],
"plugins": [
"transform-runtime"
]
}
\ No newline at end of file
......@@ -5,7 +5,7 @@
"author": "Sascha Herzinger",
"private": true,
"scripts": {
"build": "./node_modules/webpack/bin/webpack.js --config webpack.config.js --env build",
"build": "./node_modules/webpack/bin/webpack.js --config webpack.config.js --env production",
"devbuild": "./node_modules/webpack/bin/webpack.js --config webpack.config.js",
"test": "./node_modules/karma/bin/karma start karma.config.js"
},
......@@ -18,7 +18,7 @@
"devDependencies": {
"babel-core": "^7.0.0-alpha.3",
"babel-preset-latest": "^7.0.0-alpha.3",
"babel-polyfill": "^7.0.0-alpha.3",
"babel-plugin-transform-runtime": "^7.0.0-alpha.9",
"webpack": "^2.3.3",
"webpack-dev-server": "^2.4.2",
......
......@@ -9,8 +9,9 @@ let plugins = [
let filename = ''
const library = 'fractal'
if (env === 'build') {
if (env === 'production') {
plugins.push(new webpack.optimize.UglifyJsPlugin({minimize: true}))
plugins.push(new webpack.DefinePlugin({'process.env': {'NODE_ENV': JSON.stringify('production')}}))
filename = library + '.min.js'
} else {
filename = library + '.js'
......@@ -18,7 +19,6 @@ if (env === 'build') {
module.exports = {
entry: [
'babel-polyfill',
path.resolve(__dirname, 'src/main.js')
],
devtool: '#inline-source-map',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment