From 0920e95ebaa39ab8c6358bb66a3addf14c2f92a6 Mon Sep 17 00:00:00 2001 From: Shawn Erquhart Date: Wed, 17 May 2017 12:30:08 -0400 Subject: [PATCH 1/2] skip prepublish script for install --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 43218013..d3e46a34 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "test:watch": "jest --watch", "build": "NODE_ENV=production webpack --config webpack.prod.js", "build:scripts": "NODE_ENV=production webpack --config webpack.cli.js", - "prepublish": "npm run build", + "prepublish": "in-publish && npm run build || not-in-publish", "storybook": "start-storybook -p 9001", "storybook-build": "build-storybook -o dist", "lint": "npm run lint:js & npm run lint:css", @@ -68,6 +68,7 @@ "file-loader": "^0.8.5", "identity-obj-proxy": "^3.0.0", "imports-loader": "^0.6.5", + "in-publish": "^2.0.0", "jest": "19.1.0-alpha.eed82034", "jest-cli": "19.1.0-alpha.eed82034", "lint-staged": "^3.1.0", From b0123312510cb86f2d3dc354a26d46500aee070c Mon Sep 17 00:00:00 2001 From: Shawn Erquhart Date: Mon, 22 May 2017 13:26:15 -0400 Subject: [PATCH 2/2] disable host check and cors on dev server --- webpack.dev.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webpack.dev.js b/webpack.dev.js index 2c020032..1dec5f1f 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -58,5 +58,7 @@ module.exports = merge.smart(require('./webpack.base.js'), { contentBase: 'example/', historyApiFallback: true, devTool: 'cheap-module-source-map', + disableHostCheck: true, + headers: {"Access-Control-Allow-Origin": "*"}, }, });