update sapper

This commit is contained in:
Rich Harris
2017-12-18 16:24:56 -05:00
committed by GitHub
parent 5316be97b2
commit b69d378fae
3 changed files with 12 additions and 9 deletions

View File

@@ -14,5 +14,5 @@ environment:
install:
- ps: Install-Product node $env:nodejs_version
- yarn
- yarn test
- npm install cypress
- npm install

View File

@@ -4,7 +4,9 @@
"version": "0.0.1",
"scripts": {
"dev": "node server.js",
"build": "sapper build",
"start": "cross-env NODE_ENV=production node server.js",
"prestart": "npm run build",
"cy:run": "cypress run",
"cy:open": "cypress open",
"test": "run-p --race dev cy:run"
@@ -19,11 +21,12 @@
"marked": "^0.3.7",
"node-fetch": "^1.7.3",
"npm-run-all": "^4.1.2",
"sapper": "^0.1.1",
"sapper": "^0.2.0",
"serve-static": "^1.13.1",
"style-loader": "^0.19.0",
"svelte": "^1.49.1",
"svelte-loader": "^2.2.1",
"uglifyjs-webpack-plugin": "^1.1.2"
"uglifyjs-webpack-plugin": "^1.1.2",
"webpack": "^3.10.0"
}
}

View File

@@ -3,8 +3,8 @@ import { init } from '__app__';
// `routes` is an array of route objects injected by Sapper
init(document.querySelector('#sapper'), __routes__);
if (__dev__) {
// Enable hot-module reloading
import('sapper/webpack/hmr');
if (module.hot) module.hot.accept();
}
// if (__dev__) {
// // Enable hot-module reloading
// import('sapper/webpack/hmr');
// if (module.hot) module.hot.accept();
// }