From b69d378fae80fce30b80eacaf635d5d91f3d008a Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 18 Dec 2017 16:24:56 -0500 Subject: [PATCH] update sapper --- appveyor.yml | 4 ++-- package.json | 7 +++++-- templates/main.js | 10 +++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8e65f17..e75da3b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,5 +14,5 @@ environment: install: - ps: Install-Product node $env:nodejs_version - - yarn - - yarn test \ No newline at end of file + - npm install cypress + - npm install diff --git a/package.json b/package.json index c9c1c84..16f23f4 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/templates/main.js b/templates/main.js index 8e4da96..6057e23 100644 --- a/templates/main.js +++ b/templates/main.js @@ -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(); -} \ No newline at end of file +// if (__dev__) { +// // Enable hot-module reloading +// import('sapper/webpack/hmr'); +// if (module.hot) module.hot.accept(); +// } \ No newline at end of file