diff --git a/config/webpackDevServer.config.js b/config/webpackDevServer.config.js index 28b64883..f79cbed2 100644 --- a/config/webpackDevServer.config.js +++ b/config/webpackDevServer.config.js @@ -1,7 +1,6 @@ const errorOverlayMiddleware = require('react-error-overlay/middleware') const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware') const config = require('./webpack.config.dev') -const paths = require('./paths') const protocol = process.env.HTTPS === 'true' ? 'https' : 'http' const host = process.env.HOST || '0.0.0.0' @@ -31,23 +30,6 @@ module.exports = function (proxy, allowedHost) { // Silence WebpackDevServer's own logs since they're generally not useful. // It will still show compile warnings and errors with this setting. clientLogLevel: 'none', - // By default WebpackDevServer serves physical files from current directory - // in addition to all the virtual build products that it serves from memory. - // This is confusing because those files won’t automatically be available in - // production build folder unless we copy them. However, copying the whole - // project directory is dangerous because we may expose sensitive files. - // Instead, we establish a convention that only files in `public` directory - // get served. Our build script will copy `public` into the `build` folder. - // In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%: - // - // In JavaScript code, you can access it with `process.env.PUBLIC_URL`. - // Note that we only recommend to use `public` folder as an escape hatch - // for files like `favicon.ico`, `manifest.json`, and libraries that are - // for some reason broken when imported through Webpack. If you just want to - // use an image, put it in `src` and `import` it from JavaScript instead. - contentBase: paths.appPublic, - // By default files from `contentBase` will not trigger a page reload. - watchContentBase: true, // Enable hot reloading server. It will provide /sockjs-node/ endpoint // for the WebpackDevServer client so it can learn when the files were // updated. The WebpackDevServer client is included as an entry point diff --git a/package.json b/package.json index c6080e34..dcf53159 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "postcss-loader": "^2.0.5", "prompt": "1.0.0", "react-dev-utils": "^3.0.0", + "react-error-overlay": "^1.0.7", "style-loader": "^0.18.1", "url-loader": "0.5.8", "webpack": "^2.6.1", diff --git a/yarn.lock b/yarn.lock index 0f5be42c..b7901a4d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -122,6 +122,10 @@ alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" +anser@1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/anser/-/anser-1.2.5.tgz#5dcfc956eaa373b9c23010dd20dabec2ce19475b" + anser@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/anser/-/anser-1.3.0.tgz#65b42f01119edb5a2fc8ea6f0892274cbcbec6b1" @@ -790,7 +794,7 @@ babel-register@^6.24.1: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-runtime@^6.18.0, babel-runtime@^6.22.0: +babel-runtime@6.23.0, babel-runtime@^6.18.0, babel-runtime@^6.22.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" dependencies: @@ -4983,6 +4987,17 @@ react-dev-utils@^3.0.0: strip-ansi "3.0.1" text-table "0.2.0" +react-error-overlay@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-1.0.7.tgz#8712fe40cfc194ce992a4136c091c03bfada9148" + dependencies: + anser "1.2.5" + babel-code-frame "6.22.0" + babel-runtime "6.23.0" + react-dev-utils "^3.0.0" + settle-promise "1.0.0" + source-map "0.5.6" + read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -5485,6 +5500,10 @@ setprototypeof@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" +settle-promise@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/settle-promise/-/settle-promise-1.0.0.tgz#697adb58b821f387ce2757c06efc9de5f0ee33d8" + sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.8" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.8.tgz#37068c2c476b6baf402d14a49c67f597921f634f" @@ -5614,7 +5633,7 @@ source-map-support@^0.4.2: dependencies: source-map "^0.5.6" -source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3: +source-map@0.5.6, source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"