diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-04-09 17:45:07 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-04-10 14:44:53 -0500 |
commit | 3812abfa23caac0512e74f3b47412645a5302b08 (patch) | |
tree | 357b8c2756eac0ee9422b8903d33647409c74442 | |
parent | 0b5a8a34e0b7851957b976a8151a7d6acf8b9f69 (diff) | |
download | gitlab-ce-3812abfa23caac0512e74f3b47412645a5302b08.tar.gz |
watch node_modules for changes when a module is missing
-rw-r--r-- | config/webpack.config.js | 5 | ||||
-rw-r--r-- | package.json | 1 | ||||
-rw-r--r-- | yarn.lock | 68 |
3 files changed, 63 insertions, 11 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 873c7b1d4ef..0fea3f8222b 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -6,6 +6,7 @@ var webpack = require('webpack'); var StatsPlugin = require('stats-webpack-plugin'); var CompressionPlugin = require('compression-webpack-plugin'); var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; +var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); var ROOT_PATH = path.resolve(__dirname, '..'); var IS_PRODUCTION = process.env.NODE_ENV === 'production'; @@ -187,6 +188,10 @@ if (IS_DEV_SERVER) { inline: DEV_SERVER_LIVERELOAD }; config.output.publicPath = '//localhost:' + DEV_SERVER_PORT + config.output.publicPath; + config.plugins.push( + // watch node_modules for changes if we encounter a missing module compile error + new WatchMissingNodeModulesPlugin(path.join(ROOT_PATH, 'node_modules')) + ); } if (WEBPACK_REPORT) { diff --git a/package.json b/package.json index 5d9b1c34a47..9852803f14e 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "pikaday": "^1.5.1", "raphael": "^2.2.7", "raw-loader": "^0.5.1", + "react-dev-utils": "^0.5.2", "select2": "3.5.2-browserify", "stats-webpack-plugin": "^0.4.3", "three": "^0.84.0", diff --git a/yarn.lock b/yarn.lock index b5f66f0cdb0..2e2dc63034c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -72,6 +72,10 @@ ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" +ansi-html@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.5.tgz#0dcaa5a081206866bc240a3b773a184ea3b88b64" + ansi-html@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -1529,7 +1533,7 @@ debug@2.3.3: dependencies: ms "0.7.2" -debug@2.6.0, debug@^2.1.1, debug@^2.2.0: +debug@2.6.0, debug@^2.1.0, debug@^2.1.1, debug@^2.2.0: version "2.6.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" dependencies: @@ -1864,7 +1868,7 @@ escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -2056,7 +2060,7 @@ events@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" -eventsource@0.1.6: +eventsource@0.1.6, eventsource@^0.1.3: version "0.1.6" resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" dependencies: @@ -2173,6 +2177,12 @@ faye-websocket@~0.11.0: dependencies: websocket-driver ">=0.5.1" +faye-websocket@~0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.7.3.tgz#cc4074c7f4a4dfd03af54dd65c354b135132ce11" + dependencies: + websocket-driver ">=0.3.6" + fd-slicer@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" @@ -2210,6 +2220,10 @@ fileset@^2.0.2: glob "^7.0.3" minimatch "^3.0.3" +filesize@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.3.0.tgz#53149ea3460e3b2e024962a51648aa572cf98122" + filesize@^3.5.4: version "3.5.4" resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.4.tgz#742fc7fb6aef4ee3878682600c22f840731e1fda" @@ -2443,7 +2457,7 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -gzip-size@^3.0.0: +gzip-size@3.0.0, gzip-size@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520" dependencies: @@ -2560,7 +2574,7 @@ html-comment-regex@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" -html-entities@^1.2.0: +html-entities@1.2.0, html-entities@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.0.tgz#41948caf85ce82fed36e4e6a0ed371a6664379e2" @@ -3455,7 +3469,7 @@ minimalistic-assert@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: +"minimatch@2 || 3", minimatch@3.0.3, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: @@ -4329,6 +4343,21 @@ rc@~1.1.6: minimist "^1.2.0" strip-json-comments "~1.0.4" +react-dev-utils@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-0.5.2.tgz#50d0b962d3a94b6c2e8f2011ed6468e4124bc410" + dependencies: + ansi-html "0.0.5" + chalk "1.1.3" + escape-string-regexp "1.0.5" + filesize "3.3.0" + gzip-size "3.0.0" + html-entities "1.2.0" + opn "4.0.2" + recursive-readdir "2.1.1" + sockjs-client "1.0.1" + strip-ansi "3.0.1" + 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" @@ -4344,7 +4373,7 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.1.0, readable-stream@^2.2.2: +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.1.0, readable-stream@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" dependencies: @@ -4356,7 +4385,7 @@ read-pkg@^1.0.0: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@~2.0.0, readable-stream@~2.0.6: +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@~2.0.0, readable-stream@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" dependencies: @@ -4411,6 +4440,12 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" +recursive-readdir@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.1.1.tgz#a01cfc7f7f38a53ec096a096f63a50489c3e297c" + dependencies: + minimatch "3.0.3" + reduce-css-calc@^1.2.6: version "1.3.0" resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" @@ -4750,6 +4785,17 @@ socket.io@1.7.2: socket.io-client "1.7.2" socket.io-parser "2.3.1" +sockjs-client@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.0.1.tgz#8943ae05b46547bc2054816c409002cf5e2fe026" + dependencies: + debug "^2.1.0" + eventsource "^0.1.3" + faye-websocket "~0.7.3" + inherits "^2.0.1" + json3 "^3.3.2" + url-parse "^1.0.1" + sockjs-client@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.2.tgz#f0212a8550e4c9468c8cceaeefd2e3493c033ad5" @@ -4915,7 +4961,7 @@ stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" -strip-ansi@^3.0.0, strip-ansi@^3.0.1: +strip-ansi@3.0.1, strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" dependencies: @@ -5174,7 +5220,7 @@ url-parse@1.0.x: querystringify "0.0.x" requires-port "1.0.x" -url-parse@^1.1.1: +url-parse@^1.0.1, url-parse@^1.1.1: version "1.1.7" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.1.7.tgz#025cff999653a459ab34232147d89514cc87d74a" dependencies: @@ -5404,7 +5450,7 @@ webpack@^2.3.3: webpack-sources "^0.2.3" yargs "^6.0.0" -websocket-driver@>=0.5.1: +websocket-driver@>=0.3.6, websocket-driver@>=0.5.1: version "0.6.5" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" dependencies: |