improve dev environment, enable HMR (#229)

This commit is contained in:
Nolan Lawson 2018-04-28 12:10:50 -07:00 committed by GitHub
parent 562d0d2774
commit e342eadbd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

2
package-lock.json generated
View File

@ -8875,7 +8875,7 @@
} }
}, },
"sapper": { "sapper": {
"version": "github:nolanlawson/sapper#87d01e4f5e6bd30ccfdbad54a74ae595030ad033", "version": "github:nolanlawson/sapper#2124ca83c315457e7d6752507240e3ac440677bd",
"requires": { "requires": {
"chalk": "2.4.1", "chalk": "2.4.1",
"chokidar": "1.7.0", "chokidar": "1.7.0",

View File

@ -71,7 +71,7 @@
"pify": "3.0.0", "pify": "3.0.0",
"quick-lru": "1.1.0", "quick-lru": "1.1.0",
"requestidlecallback": "0.3.0", "requestidlecallback": "0.3.0",
"sapper": "github:nolanlawson/sapper#for-pinafore-6", "sapper": "github:nolanlawson/sapper#for-pinafore-7",
"serve-static": "1.13.2", "serve-static": "1.13.2",
"shrink-ray-current": "2.1.0", "shrink-ray-current": "2.1.0",
"stringz": "1.0.0", "stringz": "1.0.0",

View File

@ -26,7 +26,8 @@ module.exports = {
hydratable: true, hydratable: true,
emitCss: !isDev, emitCss: !isDev,
cascade: false, cascade: false,
store: true store: true,
hot: isDev
} }
} }
}, },
@ -49,8 +50,8 @@ module.exports = {
node: { node: {
setImmediate: false setImmediate: false
}, },
optimization: { optimization: isDev ? {} : {
minimizer: isDev ? [] : [ minimizer: [
new UglifyWebpackPlugin({ new UglifyWebpackPlugin({
cache: true, cache: true,
parallel: true, parallel: true,