From 262ff53ecbf11a5b12a0ca23e8302a52fea68701 Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Sun, 4 Mar 2018 12:55:08 +0300 Subject: [PATCH 01/11] Initial move to Webpack 4 --- app/angular/package.json | 8 +- app/polymer/package.json | 4 +- app/react-native/package.json | 6 +- app/react/package.json | 6 +- app/react/src/server/config/webpack.config.js | 10 +- app/vue/package.json | 4 +- examples/cra-kitchen-sink/package.json | 2 +- examples/polymer-cli/package.json | 6 +- examples/vue-kitchen-sink/package.json | 4 +- lib/core/package.json | 6 +- yarn.lock | 317 +++++++++++++++--- 11 files changed, 291 insertions(+), 82 deletions(-) diff --git a/app/angular/package.json b/app/angular/package.json index ac76775df057..6c8c1fadbffe 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -41,7 +41,7 @@ "dotenv-webpack": "^1.5.5", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^2.30.1", + "html-webpack-plugin": "^3.0.4", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "node-sass": "^4.7.2", @@ -50,11 +50,11 @@ "react-dev-utils": "^5.0.0", "react-dom": "^16.0.0", "redux": "^3.6.0", - "sass-loader": "^6.0.6", - "ts-loader": "^3.5.0", + "sass-loader": "^6.0.7", + "ts-loader": "^4.0.1", "uglifyjs-webpack-plugin": "^1.2.2", "util-deprecate": "^1.0.2", - "webpack": "^3.11.0", + "webpack": "^4.0.1", "webpack-hot-middleware": "^2.21.1", "zone.js": "^0.8.20" }, diff --git a/app/polymer/package.json b/app/polymer/package.json index a90e18a23b25..4f22fad7f81f 100644 --- a/app/polymer/package.json +++ b/app/polymer/package.json @@ -46,7 +46,7 @@ "dotenv-webpack": "^1.5.5", "find-cache-dir": "^1.0.0", "global": "^4.3.2", - "html-webpack-plugin": "^2.30.1", + "html-webpack-plugin": "^3.0.4", "json5": "^0.5.1", "polymer-webpack-loader": "2.0.1", "react": "^16.0.0", @@ -55,7 +55,7 @@ "redux": "^3.7.2", "uglifyjs-webpack-plugin": "^1.2.2", "util-deprecate": "^1.0.2", - "webpack": "^3.11.0", + "webpack": "^4.0.1", "webpack-hot-middleware": "^2.21.1" }, "devDependencies": { diff --git a/app/react-native/package.json b/app/react-native/package.json index 3cf27b062d9a..6c5327308d88 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -49,7 +49,7 @@ "find-cache-dir": "^1.0.0", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^2.30.1", + "html-webpack-plugin": "^3.0.4", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", @@ -60,8 +60,8 @@ "url-parse": "^1.1.9", "util-deprecate": "^1.0.2", "uuid": "^3.2.1", - "webpack": "^3.11.0", - "webpack-dev-middleware": "^1.12.2", + "webpack": "^4.0.1", + "webpack-dev-middleware": "^3.0.0", "webpack-hot-middleware": "^2.21.1", "ws": "^4.1.0" }, diff --git a/app/react/package.json b/app/react/package.json index 3044ea302427..7dc3129ef7e1 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -51,16 +51,16 @@ "glamorous": "^4.11.6", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^2.30.1", + "html-webpack-plugin": "^3.0.4", "json5": "^0.5.1", "lodash.flattendeep": "^4.4.0", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", - "react-dev-utils": "^5.0.0", + "react-dev-utils": "^6.0.0-next.47d2d941", "redux": "^3.7.2", "uglifyjs-webpack-plugin": "^1.2.2", "util-deprecate": "^1.0.2", - "webpack": "^3.11.0", + "webpack": "^4.0.1", "webpack-hot-middleware": "^2.21.1" }, "devDependencies": { diff --git a/app/react/src/server/config/webpack.config.js b/app/react/src/server/config/webpack.config.js index 2b29ad8e58ad..fc4b9b1f661b 100644 --- a/app/react/src/server/config/webpack.config.js +++ b/app/react/src/server/config/webpack.config.js @@ -1,18 +1,18 @@ import path from 'path'; import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; -import { WatchMissingNodeModulesPlugin, managerPath } from '@storybook/core/server'; +import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from './utils'; +import { includePaths, excludePaths, loadEnv, nodePaths } from './utils'; import babelLoaderConfig from './babel'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import { version } from '../../../package.json'; export default function(configDir) { const config = { + mode: 'development', devtool: 'cheap-module-source-map', entry: { manager: [require.resolve('./polyfills'), managerPath], @@ -28,7 +28,7 @@ export default function(configDir) { publicPath: '/', }, plugins: [ - new InterpolateHtmlPlugin(process.env), + // new InterpolateHtmlPlugin(process.env), new HtmlWebpackPlugin({ filename: 'index.html', chunks: ['manager'], @@ -49,7 +49,7 @@ export default function(configDir) { new webpack.DefinePlugin(loadEnv()), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), - new WatchMissingNodeModulesPlugin(nodeModulesPaths), + // new WatchMissingNodeModulesPlugin(nodeModulesPaths), new webpack.ProgressPlugin(), new Dotenv({ silent: true }), ], diff --git a/app/vue/package.json b/app/vue/package.json index 8c734803492f..f323fddfa6c7 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -43,7 +43,7 @@ "find-cache-dir": "^1.0.0", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^2.30.1", + "html-webpack-plugin": "^3.0.4", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "react": "^16.2.0", @@ -52,7 +52,7 @@ "redux": "^3.7.2", "uglifyjs-webpack-plugin": "^1.2.2", "util-deprecate": "^1.0.2", - "webpack": "^3.11.0", + "webpack": "^4.0.1", "webpack-hot-middleware": "^2.21.1" }, "devDependencies": { diff --git a/examples/cra-kitchen-sink/package.json b/examples/cra-kitchen-sink/package.json index 2d90d7566ba2..562aa26d5105 100644 --- a/examples/cra-kitchen-sink/package.json +++ b/examples/cra-kitchen-sink/package.json @@ -38,6 +38,6 @@ "enzyme-to-json": "^3.3.1", "jest": "^20.0.4", "react-scripts": "^1.1.1", - "webpack": "^3.11.0" + "webpack": "^4.0.1" } } diff --git a/examples/polymer-cli/package.json b/examples/polymer-cli/package.json index a8b39d287d18..4ea4fb703613 100644 --- a/examples/polymer-cli/package.json +++ b/examples/polymer-cli/package.json @@ -20,14 +20,14 @@ "@webcomponents/webcomponentsjs": "^1.1.0", "global": "^4.3.2", "polymer-webpack-loader": "^2.0.0", - "webpack": "^3.11.0" + "webpack": "^4.0.1" }, "devDependencies": { "babel-core": "^6.26.0", "babel-loader": "^7.1.3", "babel-runtime": "^6.26.0", "copy-webpack-plugin": "^4.5.0", - "html-webpack-plugin": "^2.30.1", - "webpack-dev-server": "^2.11.2" + "html-webpack-plugin": "^3.0.4", + "webpack-dev-server": "^3.1.0" } } diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index 7eac986496d4..1dd95d995d50 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -31,7 +31,7 @@ "cross-env": "^5.1.3", "file-loader": "^1.1.11", "vue-loader": "^14.1.1", - "webpack": "^3.11.0", - "webpack-dev-server": "^2.11.2" + "webpack": "^4.0.1", + "webpack-dev-server": "^3.1.0" } } diff --git a/lib/core/package.json b/lib/core/package.json index 33ffb5f87bcb..5b23f8798392 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -42,9 +42,9 @@ "serve-favicon": "^2.4.5", "shelljs": "^0.8.1", "style-loader": "^0.20.2", - "url-loader": "^0.6.2", - "webpack": "^3.11.0", - "webpack-dev-middleware": "^1.12.2", + "url-loader": "^1.0.1", + "webpack": "^4.0.1", + "webpack-dev-middleware": "^3.0.0", "webpack-hot-middleware": "^2.21.1" } } diff --git a/yarn.lock b/yarn.lock index f14afcc5c4bb..bd78bd322445 100644 --- a/yarn.lock +++ b/yarn.lock @@ -137,6 +137,14 @@ dependencies: tslib "^1.7.1" +"@babel/code-frame@7.0.0-beta.38": + version "7.0.0-beta.38" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.38.tgz#c0af5930617e55e050336838e3a3670983b0b2b2" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + "@babel/code-frame@7.0.0-beta.40", "@babel/code-frame@^7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6" @@ -2725,6 +2733,13 @@ browserify@^14.5.0: vm-browserify "~0.0.1" xtend "^4.0.0" +browserslist@2.11.3, browserslist@^2.11.3: + version "2.11.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" + dependencies: + caniuse-lite "^1.0.30000792" + electron-to-chromium "^1.3.30" + browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: version "1.7.7" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" @@ -2739,13 +2754,6 @@ browserslist@^2.1.2, browserslist@^2.11.1, browserslist@^2.5.1: caniuse-lite "^1.0.30000789" electron-to-chromium "^1.3.30" -browserslist@^2.11.3: - version "2.11.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" - dependencies: - caniuse-lite "^1.0.30000792" - electron-to-chromium "^1.3.30" - bser@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" @@ -3030,7 +3038,7 @@ chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: +chalk@2.3.0, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" dependencies: @@ -3171,6 +3179,10 @@ chownr@^1.0.1, chownr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" +chrome-trace-event@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-0.1.2.tgz#90f36885d5345a50621332f0717b595883d5d982" + ci-info@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" @@ -3306,6 +3318,15 @@ clone-deep@^0.3.0: kind-of "^3.2.2" shallow-clone "^0.1.2" +clone-deep@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-2.0.2.tgz#00db3a1e173656730d1188c3d6aced6d7ea97713" + dependencies: + for-own "^1.0.0" + is-plain-object "^2.0.4" + kind-of "^6.0.0" + shallow-clone "^1.0.0" + clone-stats@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" @@ -4964,7 +4985,7 @@ engine.io@~3.1.0: optionalDependencies: uws "~9.14.0" -enhanced-resolve@^3.0.0, enhanced-resolve@^3.1.0, enhanced-resolve@^3.4.0: +enhanced-resolve@^3.1.0, enhanced-resolve@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" dependencies: @@ -4973,6 +4994,14 @@ enhanced-resolve@^3.0.0, enhanced-resolve@^3.1.0, enhanced-resolve@^3.4.0: object-assign "^4.0.1" tapable "^0.2.7" +enhanced-resolve@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz#e34a6eaa790f62fccd71d93959f56b2b432db10a" + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + tapable "^1.0.0" + ent@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" @@ -6847,6 +6876,13 @@ gzip-size@3.0.0: dependencies: duplexer "^0.1.1" +gzip-size@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-4.1.0.tgz#8ae096257eabe7d69c45be2b67c448124ffb517c" + dependencies: + duplexer "^0.1.1" + pify "^3.0.0" + handle-thing@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" @@ -7164,7 +7200,7 @@ html-webpack-plugin@2.29.0: pretty-error "^2.0.2" toposort "^1.0.0" -html-webpack-plugin@^2.29.0, html-webpack-plugin@^2.30.1: +html-webpack-plugin@^2.29.0: version "2.30.1" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz#7f9c421b7ea91ec460f56527d78df484ee7537d5" dependencies: @@ -7175,6 +7211,18 @@ html-webpack-plugin@^2.29.0, html-webpack-plugin@^2.30.1: pretty-error "^2.0.2" toposort "^1.0.0" +html-webpack-plugin@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.0.4.tgz#498c10f40f99a339fbf3d87c5a80acf8cbea8e9b" + dependencies: + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + tapable "^1.0.0" + toposort "^1.0.0" + util.promisify "1.0.0" + htmlescape@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351" @@ -7517,6 +7565,24 @@ inquirer@3.3.0, inquirer@^3.0.6, inquirer@^3.2.2: strip-ansi "^4.0.0" through "^2.3.6" +inquirer@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.0.0.tgz#261b77cdb535495509f1b90197108ffb96c02db5" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.1.0" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^5.5.2" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + inquirer@^0.11.0: version "0.11.4" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.11.4.tgz#81e3374e8361beaff2d97016206d359d0b32fa4d" @@ -9694,7 +9760,7 @@ log-symbols@^1.0.2: dependencies: chalk "^1.0.0" -log-symbols@^2.2.0: +log-symbols@^2.1.0, log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" dependencies: @@ -9738,6 +9804,10 @@ loglevel@^1.4.1: version "1.6.1" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" +loglevelnext@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/loglevelnext/-/loglevelnext-1.0.3.tgz#0f69277e73bbbf2cd61b94d82313216bf87ac66e" + longest-streak@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.2.tgz#2421b6ba939a443bb9ffebf596585a50b4c38e2e" @@ -9752,7 +9822,7 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: dependencies: js-tokens "^3.0.0" -loud-rejection@^1.0.0: +loud-rejection@^1.0.0, loud-rejection@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" dependencies: @@ -10196,6 +10266,10 @@ mime@^1.2.11, mime@^1.3.4, mime@^1.4.1, mime@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" +mime@^2.0.3, mime@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.2.0.tgz#161e541965551d3b549fa1114391e3a3d55b923b" + mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" @@ -10447,6 +10521,10 @@ negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" +neo-async@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.0.tgz#76b1c823130cca26acfbaccc8fbaf0a2fa33b18f" + nested-object-assign@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/nested-object-assign/-/nested-object-assign-1.0.2.tgz#9a84ef51b5c11298b5476d6c65b26458c9eae82b" @@ -11615,6 +11693,12 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" +pkg-up@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + dependencies: + find-up "^2.1.0" + please-upgrade-node@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.0.1.tgz#0a681f2c18915e5433a5ca2cd94e0b8206a782db" @@ -12524,6 +12608,31 @@ react-dev-utils@^5.0.0: strip-ansi "3.0.1" text-table "0.2.0" +react-dev-utils@^6.0.0-next.47d2d941: + version "6.0.0-next.9754a231" + resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-6.0.0-next.9754a231.tgz#64d5a9de21b30a34cbd2138bd4bd3051379a7d77" + dependencies: + "@babel/code-frame" "7.0.0-beta.38" + address "1.0.3" + browserslist "2.11.3" + chalk "2.3.0" + cross-spawn "5.1.0" + detect-port-alt "1.1.5" + escape-string-regexp "1.0.5" + filesize "3.5.11" + global-modules "1.0.0" + gzip-size "4.1.0" + inquirer "5.0.0" + is-root "1.0.0" + opn "5.2.0" + pkg-up "2.0.0" + react-error-overlay "5.0.0-next.9754a231" + recursive-readdir "2.2.1" + shell-quote "1.6.1" + sockjs-client "1.1.4" + strip-ansi "4.0.0" + text-table "0.2.0" + react-devtools-core@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.0.0.tgz#f683e19f0311108f97dbb5b29d948323a1bf7c03" @@ -12552,6 +12661,10 @@ react-dom@^16.0.0, react-dom@^16.1.0, react-dom@^16.2.0: object-assign "^4.1.1" prop-types "^15.6.0" +react-error-overlay@5.0.0-next.9754a231: + version "5.0.0-next.9754a231" + resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.0.0-next.9754a231.tgz#4af836bc7a605f23972b95367c895c7d7577067e" + react-error-overlay@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-4.0.0.tgz#d198408a85b4070937a98667f500c832f86bd5d4" @@ -13817,6 +13930,16 @@ sass-loader@^6.0.6: lodash.tail "^4.1.1" pify "^3.0.0" +sass-loader@^6.0.7: + version "6.0.7" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-6.0.7.tgz#dd2fdb3e7eeff4a53f35ba6ac408715488353d00" + dependencies: + clone-deep "^2.0.1" + loader-utils "^1.0.1" + lodash.tail "^4.1.1" + neo-async "^2.5.0" + pify "^3.0.0" + saucelabs@~1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/saucelabs/-/saucelabs-1.3.0.tgz#d240e8009df7fa87306ec4578a69ba3b5c424fee" @@ -14110,6 +14233,14 @@ shallow-clone@^0.1.2: lazy-cache "^0.2.3" mixin-object "^2.0.1" +shallow-clone@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-1.0.0.tgz#4480cd06e882ef68b2ad88a3ea54832e2c48b571" + dependencies: + is-extendable "^0.1.1" + kind-of "^5.0.0" + mixin-object "^2.0.1" + shallowequal@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-0.2.2.tgz#1e32fd5bcab6ad688a4812cb0cc04efc75c7014e" @@ -14763,18 +14894,18 @@ strip-ansi@3.0.1, strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +strip-ansi@4.0.0, strip-ansi@^4.0.0, strip-ansi@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + strip-ansi@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.3.0.tgz#25f48ea22ca79187f3174a4db8759347bb126220" dependencies: ansi-regex "^0.2.1" -strip-ansi@^4.0.0, strip-ansi@~4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - dependencies: - ansi-regex "^3.0.0" - strip-ansi@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" @@ -14997,6 +15128,10 @@ tapable@^0.2.7: version "0.2.8" resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" +tapable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" + tar-fs@^1.15.3: version "1.16.0" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.0.tgz#e877a25acbcc51d8c790da1c57c9cf439817b896" @@ -15298,12 +15433,12 @@ ts-jest@^22.4.0: pkg-dir "^2.0.0" yargs "^11.0.0" -ts-loader@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-3.5.0.tgz#151d004dcddb4cf8e381a3bf9d6b74c2d957a9c0" +ts-loader@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-4.0.1.tgz#3d920b059966efec9637133ab0ca9b04d625d59a" dependencies: chalk "^2.3.0" - enhanced-resolve "^3.0.0" + enhanced-resolve "^4.0.0" loader-utils "^1.0.2" micromatch "^3.1.4" semver "^5.0.1" @@ -15477,9 +15612,9 @@ uglifyjs-webpack-plugin@^0.4.6: uglify-js "^2.8.29" webpack-sources "^1.0.1" -uglifyjs-webpack-plugin@^1.1.8: - version "1.2.0" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.0.tgz#f706fa4c655000a086b4a97c7d835ed0f6e9b0ef" +uglifyjs-webpack-plugin@^1.1.1, uglifyjs-webpack-plugin@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.2.tgz#e7516d4367afdb715c3847841eb46f94c45ca2b9" dependencies: cacache "^10.0.1" find-cache-dir "^1.0.0" @@ -15490,9 +15625,9 @@ uglifyjs-webpack-plugin@^1.1.8: webpack-sources "^1.1.0" worker-farm "^1.5.2" -uglifyjs-webpack-plugin@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.2.tgz#e7516d4367afdb715c3847841eb46f94c45ca2b9" +uglifyjs-webpack-plugin@^1.1.8: + version "1.2.0" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.0.tgz#f706fa4c655000a086b4a97c7d835ed0f6e9b0ef" dependencies: cacache "^10.0.1" find-cache-dir "^1.0.0" @@ -15790,6 +15925,14 @@ urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" +url-join@^2.0.2: + version "2.0.5" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-2.0.5.tgz#5af22f18c052a000a48d7b82c5e9c2e2feeda728" + +url-join@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a" + url-loader@0.6.2, url-loader@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.6.2.tgz#a007a7109620e9d988d14bce677a1decb9a993f7" @@ -15798,6 +15941,14 @@ url-loader@0.6.2, url-loader@^0.6.2: mime "^1.4.1" schema-utils "^0.3.0" +url-loader@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-1.0.1.tgz#61bc53f1f184d7343da2728a1289ef8722ea45ee" + dependencies: + loader-utils "^1.1.0" + mime "^2.0.3" + schema-utils "^0.4.3" + url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" @@ -15860,7 +16011,7 @@ util-extend@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" -util.promisify@^1.0.0: +util.promisify@1.0.0, util.promisify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" dependencies: @@ -16174,7 +16325,7 @@ webpack-core@^0.6.8: source-list-map "~0.1.7" source-map "~0.4.1" -webpack-dev-middleware@1.12.2, webpack-dev-middleware@^1.11.0, webpack-dev-middleware@^1.12.2, webpack-dev-middleware@~1.12.0: +webpack-dev-middleware@1.12.2, webpack-dev-middleware@^1.11.0, webpack-dev-middleware@~1.12.0: version "1.12.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" dependencies: @@ -16184,6 +16335,30 @@ webpack-dev-middleware@1.12.2, webpack-dev-middleware@^1.11.0, webpack-dev-middl range-parser "^1.0.3" time-stamp "^2.0.0" +webpack-dev-middleware@2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz#a51692801e8310844ef3e3790e1eacfe52326fd4" + dependencies: + loud-rejection "^1.6.0" + memory-fs "~0.4.1" + mime "^2.1.0" + path-is-absolute "^1.0.0" + range-parser "^1.0.3" + url-join "^2.0.2" + webpack-log "^1.0.1" + +webpack-dev-middleware@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.0.0.tgz#ae8902596f1b1fa8f7eada874aabb64cba9cd53e" + dependencies: + loud-rejection "^1.6.0" + memory-fs "~0.4.1" + mime "^2.1.0" + path-is-absolute "^1.0.0" + range-parser "^1.0.3" + url-join "^4.0.0" + webpack-log "^1.0.1" + webpack-dev-server@2.9.4: version "2.9.4" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.4.tgz#7883e61759c6a4b33e9b19ec4037bd4ab61428d1" @@ -16216,9 +16391,9 @@ webpack-dev-server@2.9.4: webpack-dev-middleware "^1.11.0" yargs "^6.6.0" -webpack-dev-server@^2.11.2: - version "2.11.2" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.11.2.tgz#1f4f4c78bf1895378f376815910812daf79a216f" +webpack-dev-server@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.1.0.tgz#5d2365514d9dfa0d415502742d2cc28afc4a32d8" dependencies: ansi-html "0.0.7" array-includes "^3.0.3" @@ -16245,8 +16420,9 @@ webpack-dev-server@^2.11.2: spdy "^3.4.1" strip-ansi "^3.0.0" supports-color "^5.1.0" - webpack-dev-middleware "1.12.2" - yargs "6.6.0" + webpack-dev-middleware "2.0.6" + webpack-log "^1.1.2" + yargs "9.0.1" webpack-dev-server@~2.11.0: version "2.11.0" @@ -16289,6 +16465,15 @@ webpack-hot-middleware@^2.21.1: querystring "^0.2.0" strip-ansi "^3.0.0" +webpack-log@^1.0.1, webpack-log@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-1.1.2.tgz#cdc76016537eed24708dc6aa3d1e52189efee107" + dependencies: + chalk "^2.1.0" + log-symbols "^2.1.0" + loglevelnext "^1.0.1" + uuid "^3.1.0" + webpack-manifest-plugin@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/webpack-manifest-plugin/-/webpack-manifest-plugin-1.3.2.tgz#5ea8ee5756359ddc1d98814324fe43496349a7d4" @@ -16342,7 +16527,31 @@ webpack@3.8.1: webpack-sources "^1.0.1" yargs "^8.0.2" -webpack@^3.11.0, webpack@~3.11.0: +webpack@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.0.1.tgz#768d708beeca4c5f77f6c2d38a240fb6ff50ba5d" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^3.0.0" + ajv "^6.1.0" + ajv-keywords "^3.1.0" + chrome-trace-event "^0.1.1" + enhanced-resolve "^4.0.0" + eslint-scope "^3.7.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + micromatch "^3.1.8" + mkdirp "~0.5.0" + neo-async "^2.5.0" + node-libs-browser "^2.0.0" + schema-utils "^0.4.2" + tapable "^1.0.0" + uglifyjs-webpack-plugin "^1.1.1" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + +webpack@~3.11.0: version "3.11.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.11.0.tgz#77da451b1d7b4b117adaf41a1a93b5742f24d894" dependencies: @@ -16766,6 +16975,24 @@ yargs@6.6.0, yargs@^6.6.0: y18n "^3.2.1" yargs-parser "^4.2.0" +yargs@9.0.1, yargs@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + yargs@^10.0.3: version "10.1.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.1.tgz#5fe1ea306985a099b33492001fa19a1e61efe285" @@ -16855,24 +17082,6 @@ yargs@^8.0.2: y18n "^3.2.1" yargs-parser "^7.0.0" -yargs@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" - yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" From 120a2731472c4fc45cc7cecd127a7b9fbebc21ae Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Mon, 5 Mar 2018 02:06:58 +0300 Subject: [PATCH 02/11] Migrate all apps to Webpack 4 --- .eslintignore | 2 ++ app/angular/package.json | 3 +-- .../src/server/config/webpack.config.js | 11 +++++---- .../src/server/config/webpack.config.prod.js | 20 +++------------- app/polymer/package.json | 3 +-- .../src/server/config/webpack.config.js | 11 +++++---- .../src/server/config/webpack.config.prod.js | 20 +++------------- app/react-native/package.json | 3 +-- app/react-native/src/server/config/utils.js | 7 ------ .../src/server/config/webpack.config.js | 8 +++---- .../src/server/config/webpack.config.prod.js | 24 ++----------------- app/react/package.json | 3 +-- app/react/src/server/config/webpack.config.js | 4 +++- .../src/server/config/webpack.config.prod.js | 20 +++------------- app/vue/package.json | 3 +-- app/vue/src/server/config/webpack.config.js | 11 +++++---- .../src/server/config/webpack.config.prod.js | 20 +++------------- .../.storybook/webpack.config.js | 23 ------------------ examples/cra-kitchen-sink/package.json | 2 +- examples/crna-kitchen-sink/package.json | 3 +-- .../storybook/webpack.config.js | 21 ---------------- examples/official-storybook/config.js | 3 ++- examples/polymer-cli/package.json | 2 +- .../.storybook/webpack.config.js | 12 ---------- examples/vue-kitchen-sink/package.json | 2 +- lib/core/package.json | 2 +- .../server/config/defaults/webpack.config.js | 4 ---- yarn.lock | 18 ++++++++++---- 28 files changed, 66 insertions(+), 199 deletions(-) delete mode 100644 examples/cra-kitchen-sink/.storybook/webpack.config.js delete mode 100644 examples/crna-kitchen-sink/storybook/webpack.config.js diff --git a/.eslintignore b/.eslintignore index d68999f17799..39ef5e596b55 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,6 +3,8 @@ build coverage node_modules docs/public +storybook-static +built-storybooks lib/cli/test *.bundle.js *.js.map diff --git a/app/angular/package.json b/app/angular/package.json index 6bdf4a40ae44..1e8dd18e6733 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -52,9 +52,8 @@ "redux": "^3.6.0", "sass-loader": "^6.0.7", "ts-loader": "^4.0.1", - "uglifyjs-webpack-plugin": "^1.2.2", "util-deprecate": "^1.0.2", - "webpack": "^4.0.1", + "webpack": "^4.1.0", "webpack-hot-middleware": "^2.21.2", "zone.js": "^0.8.20" }, diff --git a/app/angular/src/server/config/webpack.config.js b/app/angular/src/server/config/webpack.config.js index 30132bde3eda..19e1ffa9a8ff 100644 --- a/app/angular/src/server/config/webpack.config.js +++ b/app/angular/src/server/config/webpack.config.js @@ -1,19 +1,20 @@ import path from 'path'; import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; -import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; +// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +// import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from './utils'; +import { includePaths, excludePaths, loadEnv, nodePaths } from './utils'; import babelLoaderConfig from './babel'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import { version } from '../../../package.json'; export default function(configDir) { const config = { + mode: 'development', devtool: 'cheap-module-source-map', entry: { manager: [require.resolve('./polyfills'), managerPath], @@ -29,7 +30,6 @@ export default function(configDir) { publicPath: '/', }, plugins: [ - new InterpolateHtmlPlugin(process.env), new HtmlWebpackPlugin({ filename: 'index.html', chunks: ['manager'], @@ -47,10 +47,11 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), + // new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv()), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), - new WatchMissingNodeModulesPlugin(nodeModulesPaths), + // new WatchMissingNodeModulesPlugin(nodeModulesPaths), new webpack.ProgressPlugin(), new webpack.ContextReplacementPlugin( /angular(\\|\/)core(\\|\/)(@angular|esm5)/, diff --git a/app/angular/src/server/config/webpack.config.prod.js b/app/angular/src/server/config/webpack.config.prod.js index da46d98edbd9..892b4d230e0e 100644 --- a/app/angular/src/server/config/webpack.config.prod.js +++ b/app/angular/src/server/config/webpack.config.prod.js @@ -1,8 +1,7 @@ import path from 'path'; import webpack from 'webpack'; -import UglifyJsPlugin from 'uglifyjs-webpack-plugin'; import Dotenv from 'dotenv-webpack'; -import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; @@ -18,6 +17,7 @@ export default function(configDir) { }; const config = { + mode: 'production', bail: true, devtool: '#cheap-module-source-map', entry: entries, @@ -31,7 +31,6 @@ export default function(configDir) { publicPath: '', }, plugins: [ - new InterpolateHtmlPlugin(process.env), new HtmlWebpackPlugin({ filename: 'index.html', chunks: ['manager'], @@ -49,21 +48,8 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), + // new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv({ production: true })), - new UglifyJsPlugin({ - parallel: true, - uglifyOptions: { - ie8: false, - mangle: false, - warnings: false, - compress: { - keep_fnames: true, - }, - output: { - comments: false, - }, - }, - }), new webpack.ContextReplacementPlugin( /angular(\\|\/)core(\\|\/)(@angular|esm5)/, path.resolve(__dirname, '../src') diff --git a/app/polymer/package.json b/app/polymer/package.json index df80757afc85..0d42c66caa1f 100644 --- a/app/polymer/package.json +++ b/app/polymer/package.json @@ -53,9 +53,8 @@ "react-dev-utils": "^5.0.0", "react-dom": "^16.0.0", "redux": "^3.7.2", - "uglifyjs-webpack-plugin": "^1.2.2", "util-deprecate": "^1.0.2", - "webpack": "^4.0.1", + "webpack": "^4.1.0", "webpack-hot-middleware": "^2.21.2" }, "devDependencies": { diff --git a/app/polymer/src/server/config/webpack.config.js b/app/polymer/src/server/config/webpack.config.js index 2e4880bc76b2..f8f3f4eb2d07 100644 --- a/app/polymer/src/server/config/webpack.config.js +++ b/app/polymer/src/server/config/webpack.config.js @@ -1,20 +1,21 @@ import path from 'path'; import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; -import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; +// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +// import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from './utils'; +import { includePaths, excludePaths, loadEnv, nodePaths } from './utils'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import babelLoaderConfig from './babel'; import { version } from '../../../package.json'; export default function(configDir) { const config = { + mode: 'development', devtool: 'cheap-module-source-map', entry: { manager: [require.resolve('./polyfills'), managerPath], @@ -30,7 +31,6 @@ export default function(configDir) { publicPath: '/', }, plugins: [ - new InterpolateHtmlPlugin(process.env), new HtmlWebpackPlugin({ filename: 'index.html', chunks: ['manager'], @@ -48,6 +48,7 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), + // new InterpolateHtmlPlugin(process.env), new CopyWebpackPlugin([ { from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-lite.js') }, { from: require.resolve('@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js') }, @@ -55,7 +56,7 @@ export default function(configDir) { new webpack.DefinePlugin(loadEnv()), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), - new WatchMissingNodeModulesPlugin(nodeModulesPaths), + // new WatchMissingNodeModulesPlugin(nodeModulesPaths), new webpack.ProgressPlugin(), new Dotenv({ silent: true }), ], diff --git a/app/polymer/src/server/config/webpack.config.prod.js b/app/polymer/src/server/config/webpack.config.prod.js index 65328637e227..14d68affa191 100644 --- a/app/polymer/src/server/config/webpack.config.prod.js +++ b/app/polymer/src/server/config/webpack.config.prod.js @@ -1,7 +1,6 @@ import webpack from 'webpack'; -import UglifyJsPlugin from 'uglifyjs-webpack-plugin'; import Dotenv from 'dotenv-webpack'; -import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; import { managerPath } from '@storybook/core/server'; @@ -17,6 +16,7 @@ export default function(configDir) { }; const config = { + mode: 'production', bail: true, devtool: '#cheap-module-source-map', entry: entries, @@ -30,7 +30,6 @@ export default function(configDir) { publicPath: '', }, plugins: [ - new InterpolateHtmlPlugin(process.env), new HtmlWebpackPlugin({ filename: 'index.html', chunks: ['manager'], @@ -48,25 +47,12 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), + // new InterpolateHtmlPlugin(process.env), new CopyWebpackPlugin([ { from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-lite.js') }, { from: require.resolve('@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js') }, ]), new webpack.DefinePlugin(loadEnv({ production: true })), - new UglifyJsPlugin({ - parallel: true, - uglifyOptions: { - ie8: false, - mangle: false, - warnings: false, - compress: { - keep_fnames: true, - }, - output: { - comments: false, - }, - }, - }), new Dotenv({ silent: true }), ], module: { diff --git a/app/react-native/package.json b/app/react-native/package.json index 6bd5a80a02fa..0ffee30b46b4 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -57,11 +57,10 @@ "react-native-compat": "^1.0.0", "react-native-iphone-x-helper": "^1.0.2", "shelljs": "^0.8.1", - "uglifyjs-webpack-plugin": "^1.2.2", "url-parse": "^1.1.9", "util-deprecate": "^1.0.2", "uuid": "^3.2.1", - "webpack": "^4.0.1", + "webpack": "^4.1.0", "webpack-dev-middleware": "^3.0.0", "webpack-hot-middleware": "^2.21.2", "ws": "^4.1.0" diff --git a/app/react-native/src/server/config/utils.js b/app/react-native/src/server/config/utils.js index b71c33df1a9c..fee44f7b254e 100644 --- a/app/react-native/src/server/config/utils.js +++ b/app/react-native/src/server/config/utils.js @@ -1,12 +1,5 @@ -import webpack from 'webpack'; import path from 'path'; -export const OccurenceOrderPlugin = - // for webpack 2 - webpack.optimize.OccurrenceOrderPlugin || - // for webpack 1 - webpack.optimize.OccurenceOrderPlugin; - export const includePaths = [path.resolve('./')]; export const excludePaths = [path.resolve('./node_modules')]; diff --git a/app/react-native/src/server/config/webpack.config.js b/app/react-native/src/server/config/webpack.config.js index 0f0cf073a73c..3f6d8c98c158 100644 --- a/app/react-native/src/server/config/webpack.config.js +++ b/app/react-native/src/server/config/webpack.config.js @@ -1,11 +1,12 @@ import path from 'path'; import webpack from 'webpack'; -import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; +// import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; -import { OccurenceOrderPlugin, includePaths, excludePaths, nodeModulesPaths } from './utils'; +import { includePaths, excludePaths } from './utils'; const getConfig = options => ({ + mode: 'development', devtool: '#cheap-module-eval-source-map', entry: { manager: [require.resolve('../../manager')], @@ -23,10 +24,9 @@ const getConfig = options => ({ }, template: require.resolve('../index.html.ejs'), }), - new OccurenceOrderPlugin(), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), - new WatchMissingNodeModulesPlugin(nodeModulesPaths), + // new WatchMissingNodeModulesPlugin(nodeModulesPaths), ], module: { rules: [ diff --git a/app/react-native/src/server/config/webpack.config.prod.js b/app/react-native/src/server/config/webpack.config.prod.js index 578a4b57ff02..3235cedb9678 100644 --- a/app/react-native/src/server/config/webpack.config.prod.js +++ b/app/react-native/src/server/config/webpack.config.prod.js @@ -1,11 +1,11 @@ import path from 'path'; import webpack from 'webpack'; -import UglifyJsPlugin from 'uglifyjs-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; -import { OccurenceOrderPlugin, includePaths, excludePaths } from './utils'; +import { includePaths, excludePaths } from './utils'; const getConfig = options => { const config = { + mode: 'production', bail: true, devtool: '#cheap-module-source-map', entry: { @@ -31,20 +31,6 @@ const getConfig = options => { }), new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }), new webpack.optimize.DedupePlugin(), - new UglifyJsPlugin({ - parallel: true, - uglifyOptions: { - ie8: false, - mangle: false, - warnings: false, - compress: { - keep_fnames: true, - }, - output: { - comments: false, - }, - }, - }), ], module: { rules: [ @@ -70,12 +56,6 @@ const getConfig = options => { }, }; - // Webpack 2 doesn't have a OccurenceOrderPlugin plugin in the production mode. - // But webpack 1 has it. That's why we do this. - if (OccurenceOrderPlugin) { - config.plugins.unshift(new OccurenceOrderPlugin()); - } - return config; }; diff --git a/app/react/package.json b/app/react/package.json index 16346a5d023c..42f64677a01a 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -58,9 +58,8 @@ "prop-types": "^15.6.1", "react-dev-utils": "^6.0.0-next.47d2d941", "redux": "^3.7.2", - "uglifyjs-webpack-plugin": "^1.2.2", "util-deprecate": "^1.0.2", - "webpack": "^4.0.1", + "webpack": "^4.1.0", "webpack-hot-middleware": "^2.21.2" }, "devDependencies": { diff --git a/app/react/src/server/config/webpack.config.js b/app/react/src/server/config/webpack.config.js index fc4b9b1f661b..7e796e165a47 100644 --- a/app/react/src/server/config/webpack.config.js +++ b/app/react/src/server/config/webpack.config.js @@ -1,6 +1,8 @@ import path from 'path'; import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; +// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +// import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; @@ -28,7 +30,6 @@ export default function(configDir) { publicPath: '/', }, plugins: [ - // new InterpolateHtmlPlugin(process.env), new HtmlWebpackPlugin({ filename: 'index.html', chunks: ['manager'], @@ -46,6 +47,7 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), + // new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv()), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), diff --git a/app/react/src/server/config/webpack.config.prod.js b/app/react/src/server/config/webpack.config.prod.js index 120737a15146..9ceb92fde77d 100644 --- a/app/react/src/server/config/webpack.config.prod.js +++ b/app/react/src/server/config/webpack.config.prod.js @@ -1,7 +1,6 @@ import webpack from 'webpack'; -import UglifyJsPlugin from 'uglifyjs-webpack-plugin'; import Dotenv from 'dotenv-webpack'; -import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; import babelLoaderConfig from './babel.prod'; @@ -16,6 +15,7 @@ export default function(configDir) { }; const config = { + mode: 'production', bail: true, devtool: '#cheap-module-source-map', entry: entries, @@ -29,7 +29,6 @@ export default function(configDir) { publicPath: '', }, plugins: [ - new InterpolateHtmlPlugin(process.env), new HtmlWebpackPlugin({ filename: 'index.html', chunks: ['manager'], @@ -47,21 +46,8 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), + // new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv({ production: true })), - new UglifyJsPlugin({ - parallel: true, - uglifyOptions: { - ie8: false, - mangle: false, - warnings: false, - compress: { - keep_fnames: true, - }, - output: { - comments: false, - }, - }, - }), new Dotenv({ silent: true }), ], module: { diff --git a/app/vue/package.json b/app/vue/package.json index fafce9511db1..9db5b8ea1ab6 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -50,9 +50,8 @@ "react-dev-utils": "^5.0.0", "react-dom": "^16.2.0", "redux": "^3.7.2", - "uglifyjs-webpack-plugin": "^1.2.2", "util-deprecate": "^1.0.2", - "webpack": "^4.0.1", + "webpack": "^4.1.0", "webpack-hot-middleware": "^2.21.2" }, "devDependencies": { diff --git a/app/vue/src/server/config/webpack.config.js b/app/vue/src/server/config/webpack.config.js index eec173319fe4..c15f90263292 100644 --- a/app/vue/src/server/config/webpack.config.js +++ b/app/vue/src/server/config/webpack.config.js @@ -1,19 +1,20 @@ import path from 'path'; import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; -import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; +// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +// import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from './utils'; +import { includePaths, excludePaths, loadEnv, nodePaths } from './utils'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import babelLoaderConfig from './babel'; import { version } from '../../../package.json'; export default function(configDir) { const config = { + mode: 'development', devtool: 'cheap-module-source-map', entry: { manager: [require.resolve('./polyfills'), managerPath], @@ -29,7 +30,6 @@ export default function(configDir) { publicPath: '/', }, plugins: [ - new InterpolateHtmlPlugin(process.env), new HtmlWebpackPlugin({ filename: 'index.html', chunks: ['manager'], @@ -47,10 +47,11 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), + // new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv()), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), - new WatchMissingNodeModulesPlugin(nodeModulesPaths), + // new WatchMissingNodeModulesPlugin(nodeModulesPaths), new webpack.ProgressPlugin(), new Dotenv({ silent: true }), ], diff --git a/app/vue/src/server/config/webpack.config.prod.js b/app/vue/src/server/config/webpack.config.prod.js index 40091d93f197..0259ae884e5b 100644 --- a/app/vue/src/server/config/webpack.config.prod.js +++ b/app/vue/src/server/config/webpack.config.prod.js @@ -1,7 +1,6 @@ import webpack from 'webpack'; -import UglifyJsPlugin from 'uglifyjs-webpack-plugin'; import Dotenv from 'dotenv-webpack'; -import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; import babelLoaderConfig from './babel.prod'; @@ -16,6 +15,7 @@ export default function(configDir) { }; const config = { + mode: 'production', bail: true, devtool: '#cheap-module-source-map', entry: entries, @@ -29,7 +29,6 @@ export default function(configDir) { publicPath: '', }, plugins: [ - new InterpolateHtmlPlugin(process.env), new HtmlWebpackPlugin({ filename: 'index.html', chunks: ['manager'], @@ -47,21 +46,8 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), + // new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv({ production: true })), - new UglifyJsPlugin({ - parallel: true, - uglifyOptions: { - ie8: false, - mangle: false, - warnings: false, - compress: { - keep_fnames: true, - }, - output: { - comments: false, - }, - }, - }), new Dotenv({ silent: true }), ], module: { diff --git a/examples/cra-kitchen-sink/.storybook/webpack.config.js b/examples/cra-kitchen-sink/.storybook/webpack.config.js deleted file mode 100644 index 8a6998fc93a3..000000000000 --- a/examples/cra-kitchen-sink/.storybook/webpack.config.js +++ /dev/null @@ -1,23 +0,0 @@ -const webpack = require('webpack'); - -// Export a function. -module.exports = (storybookBaseConfig, configType, defaultConfig) => { - // configType has a value of 'DEVELOPMENT' or 'PRODUCTION' - // You can change the configuration based on that. - // 'PRODUCTION' is used when building the static version of storybook. - - // Make whatever fine-grained changes you need - defaultConfig.plugins.push( - new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - chunks: ['preview'], - minChunks(module) { - // this assumes your vendor imports exist in the node_modules directory - return module.context && module.context.indexOf('node_modules') !== -1; - }, - }) - ); - - // Return the altered config - return defaultConfig; -}; diff --git a/examples/cra-kitchen-sink/package.json b/examples/cra-kitchen-sink/package.json index 562aa26d5105..824375e2f6c8 100644 --- a/examples/cra-kitchen-sink/package.json +++ b/examples/cra-kitchen-sink/package.json @@ -38,6 +38,6 @@ "enzyme-to-json": "^3.3.1", "jest": "^20.0.4", "react-scripts": "^1.1.1", - "webpack": "^4.0.1" + "webpack": "^4.1.0" } } diff --git a/examples/crna-kitchen-sink/package.json b/examples/crna-kitchen-sink/package.json index 9a8d318628fb..48988d6d5592 100644 --- a/examples/crna-kitchen-sink/package.json +++ b/examples/crna-kitchen-sink/package.json @@ -20,8 +20,7 @@ "babel-runtime": "^6.26.0", "jest-expo": "^24.0.0", "react-native-scripts": "^1.8.1", - "react-test-renderer": "~16.2.0", - "webpack": "^3.8.1" + "react-test-renderer": "~16.2.0" }, "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js", "scripts": { diff --git a/examples/crna-kitchen-sink/storybook/webpack.config.js b/examples/crna-kitchen-sink/storybook/webpack.config.js deleted file mode 100644 index fc1c6ded8738..000000000000 --- a/examples/crna-kitchen-sink/storybook/webpack.config.js +++ /dev/null @@ -1,21 +0,0 @@ -const webpack = require('webpack'); - -module.exports = (storybookBaseConfig, configType, defaultConfig) => { - // configType has a value of 'DEVELOPMENT' or 'PRODUCTION' - // You can change the configuration based on that. - // 'PRODUCTION' is used when building the static version of storybook. - - // Make whatever fine-grained changes you need - defaultConfig.plugins.push( - new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - minChunks(module) { - // this assumes your vendor imports exist in the node_modules directory - return module.context && module.context.indexOf('node_modules') !== -1; - }, - }) - ); - - // Return the altered config - return defaultConfig; -}; diff --git a/examples/official-storybook/config.js b/examples/official-storybook/config.js index e53df3b35d7e..93fbf524b2f7 100644 --- a/examples/official-storybook/config.js +++ b/examples/official-storybook/config.js @@ -4,7 +4,8 @@ import 'react-chromatic/storybook-addon'; import addHeadWarning from './head-warning'; addHeadWarning('Preview head not loaded', 'preview-head-not-loaded'); -addHeadWarning('Dotenv file not loaded', 'dotenv-file-not-loaded'); +// TODO enable back after react-dev-utils release, see https://github.com/facebook/create-react-app/pull/4077 +// addHeadWarning('Dotenv file not loaded', 'dotenv-file-not-loaded'); setOptions({ hierarchySeparator: /\/|\./, diff --git a/examples/polymer-cli/package.json b/examples/polymer-cli/package.json index 4ea4fb703613..4e3d8a1287ff 100644 --- a/examples/polymer-cli/package.json +++ b/examples/polymer-cli/package.json @@ -20,7 +20,7 @@ "@webcomponents/webcomponentsjs": "^1.1.0", "global": "^4.3.2", "polymer-webpack-loader": "^2.0.0", - "webpack": "^4.0.1" + "webpack": "^4.1.0" }, "devDependencies": { "babel-core": "^6.26.0", diff --git a/examples/vue-kitchen-sink/.storybook/webpack.config.js b/examples/vue-kitchen-sink/.storybook/webpack.config.js index 6066d3215c5e..647e02ae0d4a 100644 --- a/examples/vue-kitchen-sink/.storybook/webpack.config.js +++ b/examples/vue-kitchen-sink/.storybook/webpack.config.js @@ -1,5 +1,4 @@ const path = require('path'); -const webpack = require('webpack'); module.exports = (storybookBaseConfig, configType, defaultConfig) => { defaultConfig.module.rules.push({ @@ -9,16 +8,5 @@ module.exports = (storybookBaseConfig, configType, defaultConfig) => { enforce: 'pre', }); - defaultConfig.plugins.push( - new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - chunks: ['preview'], - minChunks(module) { - // this assumes your vendor imports exist in the node_modules directory - return module.context && module.context.indexOf('node_modules') !== -1; - }, - }) - ); - return defaultConfig; }; diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index 1dd95d995d50..3023aa771550 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -31,7 +31,7 @@ "cross-env": "^5.1.3", "file-loader": "^1.1.11", "vue-loader": "^14.1.1", - "webpack": "^4.0.1", + "webpack": "^4.1.0", "webpack-dev-server": "^3.1.0" } } diff --git a/lib/core/package.json b/lib/core/package.json index 91b7c6aef2e8..4f8cc7e43180 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -43,7 +43,7 @@ "shelljs": "^0.8.1", "style-loader": "^0.20.2", "url-loader": "^1.0.1", - "webpack": "^4.0.1", + "webpack": "^4.1.0", "webpack-dev-middleware": "^3.0.0", "webpack-hot-middleware": "^2.21.2" } diff --git a/lib/core/src/server/config/defaults/webpack.config.js b/lib/core/src/server/config/defaults/webpack.config.js index a83800ab86bb..83c3592b6bdc 100644 --- a/lib/core/src/server/config/defaults/webpack.config.js +++ b/lib/core/src/server/config/defaults/webpack.config.js @@ -32,10 +32,6 @@ export function createDefaultWebpackConfig(storybookBaseConfig) { }, ], }, - { - test: /\.json$/, - loader: require.resolve('json-loader'), - }, { test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)(\?.*)?$/, loader: require.resolve('file-loader'), diff --git a/yarn.lock b/yarn.lock index fe68a8af5b0d..05a1943313c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15642,7 +15642,7 @@ uglifyjs-webpack-plugin@^0.4.6: uglify-js "^2.8.29" webpack-sources "^1.0.1" -uglifyjs-webpack-plugin@^1.1.1, uglifyjs-webpack-plugin@^1.2.2: +uglifyjs-webpack-plugin@^1.1.1: version "1.2.2" resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.2.tgz#e7516d4367afdb715c3847841eb46f94c45ca2b9" dependencies: @@ -16305,6 +16305,14 @@ watchpack@^1.4.0: chokidar "^1.7.0" graceful-fs "^4.1.2" +watchpack@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.5.0.tgz#231e783af830a22f8966f65c4c4bacc814072eed" + dependencies: + chokidar "^2.0.2" + graceful-fs "^4.1.2" + neo-async "^2.5.0" + wbuf@^1.1.0, wbuf@^1.7.2: version "1.7.2" resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.2.tgz#d697b99f1f59512df2751be42769c1580b5801fe" @@ -16557,9 +16565,9 @@ webpack@3.8.1: webpack-sources "^1.0.1" yargs "^8.0.2" -webpack@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.0.1.tgz#768d708beeca4c5f77f6c2d38a240fb6ff50ba5d" +webpack@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.1.0.tgz#91b6862e56eb3b18b79bb10b51866987ff10d2d6" dependencies: acorn "^5.0.0" acorn-dynamic-import "^3.0.0" @@ -16578,7 +16586,7 @@ webpack@^4.0.1: schema-utils "^0.4.2" tapable "^1.0.0" uglifyjs-webpack-plugin "^1.1.1" - watchpack "^1.4.0" + watchpack "^1.5.0" webpack-sources "^1.0.1" webpack@~3.11.0: From 7c1ec3a8e57a5d5d82dde6eeb09aadae31f057e6 Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Fri, 9 Mar 2018 01:28:29 +0200 Subject: [PATCH 03/11] Update webpack & Co --- app/angular/package.json | 4 ++-- app/polymer/package.json | 4 ++-- app/react-native/package.json | 6 +++--- app/react/package.json | 4 ++-- app/vue/package.json | 4 ++-- examples/cra-kitchen-sink/package.json | 2 +- examples/polymer-cli/package.json | 4 ++-- examples/vue-kitchen-sink/package.json | 2 +- lib/core/package.json | 4 ++-- yarn.lock | 18 +++++++++--------- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/app/angular/package.json b/app/angular/package.json index bf07ef96327c..a08f5415ce30 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -41,7 +41,7 @@ "dotenv-webpack": "^1.5.5", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.4", + "html-webpack-plugin": "^3.0.6", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "node-sass": "^4.7.2", @@ -53,7 +53,7 @@ "sass-loader": "^6.0.7", "ts-loader": "^4.0.1", "util-deprecate": "^1.0.2", - "webpack": "^4.1.0", + "webpack": "^4.1.1", "webpack-hot-middleware": "^2.21.2", "zone.js": "^0.8.20" }, diff --git a/app/polymer/package.json b/app/polymer/package.json index b0df3275f5f6..92d30e95d9d2 100644 --- a/app/polymer/package.json +++ b/app/polymer/package.json @@ -46,14 +46,14 @@ "dotenv-webpack": "^1.5.5", "find-cache-dir": "^1.0.0", "global": "^4.3.2", - "html-webpack-plugin": "^3.0.4", + "html-webpack-plugin": "^3.0.6", "json5": "^0.5.1", "react": "^16.0.0", "react-dev-utils": "^5.0.0", "react-dom": "^16.0.0", "redux": "^3.7.2", "util-deprecate": "^1.0.2", - "webpack": "^4.1.0", + "webpack": "^4.1.1", "webpack-hot-middleware": "^2.21.2" }, "devDependencies": { diff --git a/app/react-native/package.json b/app/react-native/package.json index a0f9ccecb7e9..9568dd776ac6 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -49,7 +49,7 @@ "find-cache-dir": "^1.0.0", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.4", + "html-webpack-plugin": "^3.0.6", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", @@ -60,8 +60,8 @@ "url-parse": "^1.1.9", "util-deprecate": "^1.0.2", "uuid": "^3.2.1", - "webpack": "^4.1.0", - "webpack-dev-middleware": "^3.0.0", + "webpack": "^4.1.1", + "webpack-dev-middleware": "^3.0.1", "webpack-hot-middleware": "^2.21.2", "ws": "^4.1.0" }, diff --git a/app/react/package.json b/app/react/package.json index 884f6b142b09..3c4f572692a6 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -51,7 +51,7 @@ "glamorous": "^4.12.0", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.4", + "html-webpack-plugin": "^3.0.6", "json5": "^0.5.1", "lodash.flattendeep": "^4.4.0", "markdown-loader": "^2.0.2", @@ -59,7 +59,7 @@ "react-dev-utils": "^6.0.0-next.47d2d941", "redux": "^3.7.2", "util-deprecate": "^1.0.2", - "webpack": "^4.1.0", + "webpack": "^4.1.1", "webpack-hot-middleware": "^2.21.2" }, "devDependencies": { diff --git a/app/vue/package.json b/app/vue/package.json index 7a1d9abef4b3..a56516f7cf56 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -43,7 +43,7 @@ "find-cache-dir": "^1.0.0", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.4", + "html-webpack-plugin": "^3.0.6", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "react": "^16.2.0", @@ -51,7 +51,7 @@ "react-dom": "^16.2.0", "redux": "^3.7.2", "util-deprecate": "^1.0.2", - "webpack": "^4.1.0", + "webpack": "^4.1.1", "webpack-hot-middleware": "^2.21.2" }, "devDependencies": { diff --git a/examples/cra-kitchen-sink/package.json b/examples/cra-kitchen-sink/package.json index c95f02871ab4..9c15f4d93eba 100644 --- a/examples/cra-kitchen-sink/package.json +++ b/examples/cra-kitchen-sink/package.json @@ -38,6 +38,6 @@ "enzyme-to-json": "^3.3.2", "jest": "^20.0.4", "react-scripts": "^1.1.1", - "webpack": "^4.1.0" + "webpack": "^4.1.1" } } diff --git a/examples/polymer-cli/package.json b/examples/polymer-cli/package.json index aad3dc50aa7f..e7315765b0da 100644 --- a/examples/polymer-cli/package.json +++ b/examples/polymer-cli/package.json @@ -20,14 +20,14 @@ "@webcomponents/webcomponentsjs": "^1.1.0", "global": "^4.3.2", "polymer-webpack-loader": "^2.0.1", - "webpack": "^4.1.0" + "webpack": "^4.1.1" }, "devDependencies": { "babel-core": "^6.26.0", "babel-loader": "^7.1.4", "babel-runtime": "^6.26.0", "copy-webpack-plugin": "^4.5.0", - "html-webpack-plugin": "^3.0.4", + "html-webpack-plugin": "^3.0.6", "webpack-dev-server": "^3.1.0" } } diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index 9409560af747..951ea798af11 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -31,7 +31,7 @@ "cross-env": "^5.1.3", "file-loader": "^1.1.11", "vue-loader": "^14.2.1", - "webpack": "^4.1.0", + "webpack": "^4.1.1", "webpack-dev-server": "^3.1.0" } } diff --git a/lib/core/package.json b/lib/core/package.json index e42d80d90901..de654294f5af 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -43,8 +43,8 @@ "shelljs": "^0.8.1", "style-loader": "^0.20.2", "url-loader": "^1.0.1", - "webpack": "^4.1.0", - "webpack-dev-middleware": "^3.0.0", + "webpack": "^4.1.1", + "webpack-dev-middleware": "^3.0.1", "webpack-hot-middleware": "^2.21.2" } } diff --git a/yarn.lock b/yarn.lock index b2c8fe046a50..b7f5cceeb76d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7253,9 +7253,9 @@ html-webpack-plugin@^2.29.0: pretty-error "^2.0.2" toposort "^1.0.0" -html-webpack-plugin@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.0.4.tgz#498c10f40f99a339fbf3d87c5a80acf8cbea8e9b" +html-webpack-plugin@^3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.0.6.tgz#d35b0452aae129a8a9f3fac44a169a625d8cf3fa" dependencies: html-minifier "^3.2.3" loader-utils "^0.2.16" @@ -16416,9 +16416,9 @@ webpack-dev-middleware@2.0.6: url-join "^2.0.2" webpack-log "^1.0.1" -webpack-dev-middleware@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.0.0.tgz#ae8902596f1b1fa8f7eada874aabb64cba9cd53e" +webpack-dev-middleware@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.0.1.tgz#7ffd6d0192883c83d3f262e8d7dec822493c6166" dependencies: loud-rejection "^1.6.0" memory-fs "~0.4.1" @@ -16596,9 +16596,9 @@ webpack@3.8.1: webpack-sources "^1.0.1" yargs "^8.0.2" -webpack@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.1.0.tgz#91b6862e56eb3b18b79bb10b51866987ff10d2d6" +webpack@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.1.1.tgz#44e4d6a869dd36fdfc0b227f9bd865a4bccfd81c" dependencies: acorn "^5.0.0" acorn-dynamic-import "^3.0.0" From ea61da50c4dcdfe8d450584727d0713efc338475 Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Fri, 9 Mar 2018 23:09:01 +0200 Subject: [PATCH 04/11] Use optimization.splitChunks & optimization.runtimeChunks to split vendor, webpack runtime, and user code chunks --- app/angular/src/server/config/webpack.config.js | 10 ++++++++++ app/angular/src/server/config/webpack.config.prod.js | 10 ++++++++++ app/polymer/src/server/config/webpack.config.js | 10 ++++++++++ app/polymer/src/server/config/webpack.config.prod.js | 10 ++++++++++ app/react-native/src/server/config/webpack.config.js | 10 ++++++++++ .../src/server/config/webpack.config.prod.js | 10 ++++++++++ app/react/src/server/config/webpack.config.js | 10 ++++++++++ app/react/src/server/config/webpack.config.prod.js | 10 ++++++++++ app/vue/src/server/config/webpack.config.js | 10 ++++++++++ app/vue/src/server/config/webpack.config.prod.js | 10 ++++++++++ 10 files changed, 100 insertions(+) diff --git a/app/angular/src/server/config/webpack.config.js b/app/angular/src/server/config/webpack.config.js index 19e1ffa9a8ff..f0737600b64b 100644 --- a/app/angular/src/server/config/webpack.config.js +++ b/app/angular/src/server/config/webpack.config.js @@ -110,6 +110,16 @@ export default function(configDir) { performance: { hints: false, }, + optimization: { + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + splitChunks: { + chunks: 'all', + }, + // Keep the runtime chunk seperated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 + runtimeChunk: true, + }, }; return config; diff --git a/app/angular/src/server/config/webpack.config.prod.js b/app/angular/src/server/config/webpack.config.prod.js index 892b4d230e0e..7ccd79686016 100644 --- a/app/angular/src/server/config/webpack.config.prod.js +++ b/app/angular/src/server/config/webpack.config.prod.js @@ -104,6 +104,16 @@ export default function(configDir) { // Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253 modules: ['node_modules'].concat(nodePaths), }, + optimization: { + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + splitChunks: { + chunks: 'all', + }, + // Keep the runtime chunk seperated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 + runtimeChunk: true, + }, }; return config; diff --git a/app/polymer/src/server/config/webpack.config.js b/app/polymer/src/server/config/webpack.config.js index f8f3f4eb2d07..e5d36c8e8a26 100644 --- a/app/polymer/src/server/config/webpack.config.js +++ b/app/polymer/src/server/config/webpack.config.js @@ -95,6 +95,16 @@ export default function(configDir) { performance: { hints: false, }, + optimization: { + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + splitChunks: { + chunks: 'all', + }, + // Keep the runtime chunk seperated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 + runtimeChunk: true, + }, }; return config; diff --git a/app/polymer/src/server/config/webpack.config.prod.js b/app/polymer/src/server/config/webpack.config.prod.js index 14d68affa191..56cdcf3a8d95 100644 --- a/app/polymer/src/server/config/webpack.config.prod.js +++ b/app/polymer/src/server/config/webpack.config.prod.js @@ -87,6 +87,16 @@ export default function(configDir) { // Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253 modules: ['node_modules'].concat(nodePaths), }, + optimization: { + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + splitChunks: { + chunks: 'all', + }, + // Keep the runtime chunk seperated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 + runtimeChunk: true, + }, }; return config; diff --git a/app/react-native/src/server/config/webpack.config.js b/app/react-native/src/server/config/webpack.config.js index 3f6d8c98c158..0c1fd6ed7aa7 100644 --- a/app/react-native/src/server/config/webpack.config.js +++ b/app/react-native/src/server/config/webpack.config.js @@ -50,6 +50,16 @@ const getConfig = options => ({ }, ], }, + optimization: { + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + splitChunks: { + chunks: 'all', + }, + // Keep the runtime chunk seperated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 + runtimeChunk: true, + }, }); export default getConfig; diff --git a/app/react-native/src/server/config/webpack.config.prod.js b/app/react-native/src/server/config/webpack.config.prod.js index 3235cedb9678..eadbcba6b582 100644 --- a/app/react-native/src/server/config/webpack.config.prod.js +++ b/app/react-native/src/server/config/webpack.config.prod.js @@ -54,6 +54,16 @@ const getConfig = options => { }, ], }, + optimization: { + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + splitChunks: { + chunks: 'all', + }, + // Keep the runtime chunk seperated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 + runtimeChunk: true, + }, }; return config; diff --git a/app/react/src/server/config/webpack.config.js b/app/react/src/server/config/webpack.config.js index 7e796e165a47..8facf0688357 100644 --- a/app/react/src/server/config/webpack.config.js +++ b/app/react/src/server/config/webpack.config.js @@ -88,6 +88,16 @@ export default function(configDir) { performance: { hints: false, }, + optimization: { + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + splitChunks: { + chunks: 'all', + }, + // Keep the runtime chunk seperated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 + runtimeChunk: true, + }, }; return config; diff --git a/app/react/src/server/config/webpack.config.prod.js b/app/react/src/server/config/webpack.config.prod.js index 9ceb92fde77d..a7502a8571ff 100644 --- a/app/react/src/server/config/webpack.config.prod.js +++ b/app/react/src/server/config/webpack.config.prod.js @@ -80,6 +80,16 @@ export default function(configDir) { // Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253 modules: ['node_modules'].concat(nodePaths), }, + optimization: { + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + splitChunks: { + chunks: 'all', + }, + // Keep the runtime chunk seperated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 + runtimeChunk: true, + }, }; return config; diff --git a/app/vue/src/server/config/webpack.config.js b/app/vue/src/server/config/webpack.config.js index c15f90263292..803bc47a7a5e 100644 --- a/app/vue/src/server/config/webpack.config.js +++ b/app/vue/src/server/config/webpack.config.js @@ -96,6 +96,16 @@ export default function(configDir) { performance: { hints: false, }, + optimization: { + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + splitChunks: { + chunks: 'all', + }, + // Keep the runtime chunk seperated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 + runtimeChunk: true, + }, }; return config; diff --git a/app/vue/src/server/config/webpack.config.prod.js b/app/vue/src/server/config/webpack.config.prod.js index 0259ae884e5b..fd248b157511 100644 --- a/app/vue/src/server/config/webpack.config.prod.js +++ b/app/vue/src/server/config/webpack.config.prod.js @@ -88,6 +88,16 @@ export default function(configDir) { vue$: require.resolve('vue/dist/vue.esm.js'), }, }, + optimization: { + // Automatically split vendor and commons + // https://twitter.com/wSokra/status/969633336732905474 + splitChunks: { + chunks: 'all', + }, + // Keep the runtime chunk seperated to enable long term caching + // https://twitter.com/wSokra/status/969679223278505985 + runtimeChunk: true, + }, }; return config; From 19bf35f0e88fb64f470a09dc68c4d4dbf65c62be Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Fri, 9 Mar 2018 23:18:00 +0200 Subject: [PATCH 05/11] Revert "Use optimization.splitChunks & optimization.runtimeChunks to split vendor, webpack runtime, and user code chunks" This reverts commit ea61da5 --- app/angular/src/server/config/webpack.config.js | 10 ---------- app/angular/src/server/config/webpack.config.prod.js | 10 ---------- app/polymer/src/server/config/webpack.config.js | 10 ---------- app/polymer/src/server/config/webpack.config.prod.js | 10 ---------- app/react-native/src/server/config/webpack.config.js | 10 ---------- .../src/server/config/webpack.config.prod.js | 10 ---------- app/react/src/server/config/webpack.config.js | 10 ---------- app/react/src/server/config/webpack.config.prod.js | 10 ---------- app/vue/src/server/config/webpack.config.js | 10 ---------- app/vue/src/server/config/webpack.config.prod.js | 10 ---------- 10 files changed, 100 deletions(-) diff --git a/app/angular/src/server/config/webpack.config.js b/app/angular/src/server/config/webpack.config.js index f0737600b64b..19e1ffa9a8ff 100644 --- a/app/angular/src/server/config/webpack.config.js +++ b/app/angular/src/server/config/webpack.config.js @@ -110,16 +110,6 @@ export default function(configDir) { performance: { hints: false, }, - optimization: { - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - splitChunks: { - chunks: 'all', - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 - runtimeChunk: true, - }, }; return config; diff --git a/app/angular/src/server/config/webpack.config.prod.js b/app/angular/src/server/config/webpack.config.prod.js index 7ccd79686016..892b4d230e0e 100644 --- a/app/angular/src/server/config/webpack.config.prod.js +++ b/app/angular/src/server/config/webpack.config.prod.js @@ -104,16 +104,6 @@ export default function(configDir) { // Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253 modules: ['node_modules'].concat(nodePaths), }, - optimization: { - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - splitChunks: { - chunks: 'all', - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 - runtimeChunk: true, - }, }; return config; diff --git a/app/polymer/src/server/config/webpack.config.js b/app/polymer/src/server/config/webpack.config.js index e5d36c8e8a26..f8f3f4eb2d07 100644 --- a/app/polymer/src/server/config/webpack.config.js +++ b/app/polymer/src/server/config/webpack.config.js @@ -95,16 +95,6 @@ export default function(configDir) { performance: { hints: false, }, - optimization: { - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - splitChunks: { - chunks: 'all', - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 - runtimeChunk: true, - }, }; return config; diff --git a/app/polymer/src/server/config/webpack.config.prod.js b/app/polymer/src/server/config/webpack.config.prod.js index 56cdcf3a8d95..14d68affa191 100644 --- a/app/polymer/src/server/config/webpack.config.prod.js +++ b/app/polymer/src/server/config/webpack.config.prod.js @@ -87,16 +87,6 @@ export default function(configDir) { // Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253 modules: ['node_modules'].concat(nodePaths), }, - optimization: { - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - splitChunks: { - chunks: 'all', - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 - runtimeChunk: true, - }, }; return config; diff --git a/app/react-native/src/server/config/webpack.config.js b/app/react-native/src/server/config/webpack.config.js index 0c1fd6ed7aa7..3f6d8c98c158 100644 --- a/app/react-native/src/server/config/webpack.config.js +++ b/app/react-native/src/server/config/webpack.config.js @@ -50,16 +50,6 @@ const getConfig = options => ({ }, ], }, - optimization: { - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - splitChunks: { - chunks: 'all', - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 - runtimeChunk: true, - }, }); export default getConfig; diff --git a/app/react-native/src/server/config/webpack.config.prod.js b/app/react-native/src/server/config/webpack.config.prod.js index eadbcba6b582..3235cedb9678 100644 --- a/app/react-native/src/server/config/webpack.config.prod.js +++ b/app/react-native/src/server/config/webpack.config.prod.js @@ -54,16 +54,6 @@ const getConfig = options => { }, ], }, - optimization: { - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - splitChunks: { - chunks: 'all', - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 - runtimeChunk: true, - }, }; return config; diff --git a/app/react/src/server/config/webpack.config.js b/app/react/src/server/config/webpack.config.js index 8facf0688357..7e796e165a47 100644 --- a/app/react/src/server/config/webpack.config.js +++ b/app/react/src/server/config/webpack.config.js @@ -88,16 +88,6 @@ export default function(configDir) { performance: { hints: false, }, - optimization: { - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - splitChunks: { - chunks: 'all', - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 - runtimeChunk: true, - }, }; return config; diff --git a/app/react/src/server/config/webpack.config.prod.js b/app/react/src/server/config/webpack.config.prod.js index a7502a8571ff..9ceb92fde77d 100644 --- a/app/react/src/server/config/webpack.config.prod.js +++ b/app/react/src/server/config/webpack.config.prod.js @@ -80,16 +80,6 @@ export default function(configDir) { // Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253 modules: ['node_modules'].concat(nodePaths), }, - optimization: { - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - splitChunks: { - chunks: 'all', - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 - runtimeChunk: true, - }, }; return config; diff --git a/app/vue/src/server/config/webpack.config.js b/app/vue/src/server/config/webpack.config.js index 803bc47a7a5e..c15f90263292 100644 --- a/app/vue/src/server/config/webpack.config.js +++ b/app/vue/src/server/config/webpack.config.js @@ -96,16 +96,6 @@ export default function(configDir) { performance: { hints: false, }, - optimization: { - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - splitChunks: { - chunks: 'all', - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 - runtimeChunk: true, - }, }; return config; diff --git a/app/vue/src/server/config/webpack.config.prod.js b/app/vue/src/server/config/webpack.config.prod.js index fd248b157511..0259ae884e5b 100644 --- a/app/vue/src/server/config/webpack.config.prod.js +++ b/app/vue/src/server/config/webpack.config.prod.js @@ -88,16 +88,6 @@ export default function(configDir) { vue$: require.resolve('vue/dist/vue.esm.js'), }, }, - optimization: { - // Automatically split vendor and commons - // https://twitter.com/wSokra/status/969633336732905474 - splitChunks: { - chunks: 'all', - }, - // Keep the runtime chunk seperated to enable long term caching - // https://twitter.com/wSokra/status/969679223278505985 - runtimeChunk: true, - }, }; return config; From 1c768d9e4caf07d09ae342236fb01097a91e838b Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Sun, 18 Mar 2018 15:20:15 +0300 Subject: [PATCH 06/11] Update webpack-related deps --- app/angular/package.json | 2 +- examples/polymer-cli/package.json | 2 +- examples/vue-kitchen-sink/package.json | 2 +- lib/core/package.json | 2 +- yarn.lock | 38 ++++++++------------------ 5 files changed, 15 insertions(+), 31 deletions(-) diff --git a/app/angular/package.json b/app/angular/package.json index 8b4937ac113b..48b065fe347b 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -51,7 +51,7 @@ "react-dom": "^16.0.0", "redux": "^3.6.0", "sass-loader": "^6.0.7", - "ts-loader": "^4.0.1", + "ts-loader": "^4.1.0", "util-deprecate": "^1.0.2", "webpack": "^4.1.1", "webpack-hot-middleware": "^2.21.2", diff --git a/examples/polymer-cli/package.json b/examples/polymer-cli/package.json index 4acfd25a459b..48507b88c762 100644 --- a/examples/polymer-cli/package.json +++ b/examples/polymer-cli/package.json @@ -28,6 +28,6 @@ "babel-runtime": "^6.26.0", "copy-webpack-plugin": "^4.5.1", "html-webpack-plugin": "^3.0.6", - "webpack-dev-server": "^3.1.0" + "webpack-dev-server": "^3.1.1" } } diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index c5e198791252..50997a5e3662 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -32,6 +32,6 @@ "file-loader": "^1.1.11", "vue-loader": "^14.2.1", "webpack": "^4.1.1", - "webpack-dev-server": "^3.1.0" + "webpack-dev-server": "^3.1.1" } } diff --git a/lib/core/package.json b/lib/core/package.json index 680381e09c69..6fdcf713e639 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -34,7 +34,7 @@ "global": "^4.3.2", "json-loader": "^0.5.7", "postcss-flexbugs-fixes": "^3.2.0", - "postcss-loader": "^2.1.1", + "postcss-loader": "^2.1.2", "prop-types": "^15.6.1", "qs": "^6.5.1", "react": "^16.0.0", diff --git a/yarn.lock b/yarn.lock index 2349f07cba23..942b9b64b7f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12061,9 +12061,9 @@ postcss-loader@^2.0.10: postcss-load-config "^1.2.0" schema-utils "^0.3.0" -postcss-loader@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.1.1.tgz#208935af3b1d65e1abb1a870a912dd12e7b36895" +postcss-loader@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.1.2.tgz#03f54e23be736c9ea4f610e17d2a299254c05130" dependencies: loader-utils "^1.1.0" postcss "^6.0.0" @@ -15675,9 +15675,9 @@ ts-jest@^22.4.1: pkg-dir "^2.0.0" yargs "^11.0.0" -ts-loader@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-4.0.1.tgz#3d920b059966efec9637133ab0ca9b04d625d59a" +ts-loader@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-4.1.0.tgz#6216e75600941df3270bc4a7125e20aefb2dc5ea" dependencies: chalk "^2.3.0" enhanced-resolve "^4.0.0" @@ -16170,10 +16170,6 @@ urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" -url-join@^2.0.2: - version "2.0.5" - resolved "https://registry.yarnpkg.com/url-join/-/url-join-2.0.5.tgz#5af22f18c052a000a48d7b82c5e9c2e2feeda728" - url-join@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a" @@ -16588,19 +16584,7 @@ webpack-dev-middleware@1.12.2, webpack-dev-middleware@^1.11.0, webpack-dev-middl range-parser "^1.0.3" time-stamp "^2.0.0" -webpack-dev-middleware@2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz#a51692801e8310844ef3e3790e1eacfe52326fd4" - dependencies: - loud-rejection "^1.6.0" - memory-fs "~0.4.1" - mime "^2.1.0" - path-is-absolute "^1.0.0" - range-parser "^1.0.3" - url-join "^2.0.2" - webpack-log "^1.0.1" - -webpack-dev-middleware@^3.0.1: +webpack-dev-middleware@3.0.1, webpack-dev-middleware@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.0.1.tgz#7ffd6d0192883c83d3f262e8d7dec822493c6166" dependencies: @@ -16644,9 +16628,9 @@ webpack-dev-server@2.9.4: webpack-dev-middleware "^1.11.0" yargs "^6.6.0" -webpack-dev-server@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.1.0.tgz#5d2365514d9dfa0d415502742d2cc28afc4a32d8" +webpack-dev-server@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.1.1.tgz#3c0fdd1ba3b50ebc79858a0e6b9ccdd1565b0c24" dependencies: ansi-html "0.0.7" array-includes "^3.0.3" @@ -16673,7 +16657,7 @@ webpack-dev-server@^3.1.0: spdy "^3.4.1" strip-ansi "^3.0.0" supports-color "^5.1.0" - webpack-dev-middleware "2.0.6" + webpack-dev-middleware "3.0.1" webpack-log "^1.1.2" yargs "9.0.1" From dff3cd6eae318c092c8a96bf85fbdf3e43dc8f3a Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Wed, 21 Mar 2018 00:57:43 +0300 Subject: [PATCH 07/11] Use a temporary fork of react-dev-utils --- app/angular/package.json | 4 +- .../src/server/config/webpack.config.js | 10 +- .../src/server/config/webpack.config.prod.js | 4 +- app/polymer/package.json | 4 +- .../src/server/config/webpack.config.js | 10 +- .../src/server/config/webpack.config.prod.js | 4 +- app/react-native/package.json | 4 +- .../src/server/config/webpack.config.js | 6 +- app/react/package.json | 4 +- app/react/src/server/config/webpack.config.js | 10 +- .../src/server/config/webpack.config.prod.js | 4 +- app/vue/package.json | 4 +- app/vue/src/server/config/webpack.config.js | 10 +- .../src/server/config/webpack.config.prod.js | 4 +- examples/official-storybook/config.js | 3 +- examples/polymer-cli/package.json | 2 +- lib/core/package.json | 2 +- yarn.lock | 263 +++++++++--------- 18 files changed, 183 insertions(+), 169 deletions(-) diff --git a/app/angular/package.json b/app/angular/package.json index 527ac57a7276..8570b97ea7ab 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -41,13 +41,13 @@ "dotenv-webpack": "^1.5.5", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.6", + "html-webpack-plugin": "^3.0.7", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "node-sass": "^4.8.3", "raw-loader": "^0.5.1", "react": "^16.0.0", - "react-dev-utils": "^5.0.0", + "react-dev-utils": "zanettin/react-dev-utils", "react-dom": "^16.0.0", "redux": "^3.6.0", "sass-loader": "^6.0.7", diff --git a/app/angular/src/server/config/webpack.config.js b/app/angular/src/server/config/webpack.config.js index 19e1ffa9a8ff..858cff1d980d 100644 --- a/app/angular/src/server/config/webpack.config.js +++ b/app/angular/src/server/config/webpack.config.js @@ -1,13 +1,13 @@ import path from 'path'; import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; -// import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; +import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, loadEnv, nodePaths } from './utils'; +import { includePaths, excludePaths, loadEnv, nodePaths, nodeModulesPaths } from './utils'; import babelLoaderConfig from './babel'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import { version } from '../../../package.json'; @@ -47,11 +47,11 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), - // new InterpolateHtmlPlugin(process.env), + new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv()), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), - // new WatchMissingNodeModulesPlugin(nodeModulesPaths), + new WatchMissingNodeModulesPlugin(nodeModulesPaths), new webpack.ProgressPlugin(), new webpack.ContextReplacementPlugin( /angular(\\|\/)core(\\|\/)(@angular|esm5)/, diff --git a/app/angular/src/server/config/webpack.config.prod.js b/app/angular/src/server/config/webpack.config.prod.js index 892b4d230e0e..8300c2fef9dd 100644 --- a/app/angular/src/server/config/webpack.config.prod.js +++ b/app/angular/src/server/config/webpack.config.prod.js @@ -1,7 +1,7 @@ import path from 'path'; import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; @@ -48,7 +48,7 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), - // new InterpolateHtmlPlugin(process.env), + new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv({ production: true })), new webpack.ContextReplacementPlugin( /angular(\\|\/)core(\\|\/)(@angular|esm5)/, diff --git a/app/polymer/package.json b/app/polymer/package.json index 45a73397e68b..cfb8a4204d93 100644 --- a/app/polymer/package.json +++ b/app/polymer/package.json @@ -46,10 +46,10 @@ "dotenv-webpack": "^1.5.5", "find-cache-dir": "^1.0.0", "global": "^4.3.2", - "html-webpack-plugin": "^3.0.6", + "html-webpack-plugin": "^3.0.7", "json5": "^0.5.1", "react": "^16.0.0", - "react-dev-utils": "^5.0.0", + "react-dev-utils": "zanettin/react-dev-utils", "react-dom": "^16.0.0", "redux": "^3.7.2", "util-deprecate": "^1.0.2", diff --git a/app/polymer/src/server/config/webpack.config.js b/app/polymer/src/server/config/webpack.config.js index f8f3f4eb2d07..f78e4cd2d283 100644 --- a/app/polymer/src/server/config/webpack.config.js +++ b/app/polymer/src/server/config/webpack.config.js @@ -1,14 +1,14 @@ import path from 'path'; import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; -// import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; +import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, loadEnv, nodePaths } from './utils'; +import { includePaths, excludePaths, loadEnv, nodePaths, nodeModulesPaths } from './utils'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import babelLoaderConfig from './babel'; import { version } from '../../../package.json'; @@ -48,7 +48,7 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), - // new InterpolateHtmlPlugin(process.env), + new InterpolateHtmlPlugin(process.env), new CopyWebpackPlugin([ { from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-lite.js') }, { from: require.resolve('@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js') }, @@ -56,7 +56,7 @@ export default function(configDir) { new webpack.DefinePlugin(loadEnv()), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), - // new WatchMissingNodeModulesPlugin(nodeModulesPaths), + new WatchMissingNodeModulesPlugin(nodeModulesPaths), new webpack.ProgressPlugin(), new Dotenv({ silent: true }), ], diff --git a/app/polymer/src/server/config/webpack.config.prod.js b/app/polymer/src/server/config/webpack.config.prod.js index 14d68affa191..2b2bde9c5452 100644 --- a/app/polymer/src/server/config/webpack.config.prod.js +++ b/app/polymer/src/server/config/webpack.config.prod.js @@ -1,6 +1,6 @@ import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; import { managerPath } from '@storybook/core/server'; @@ -47,7 +47,7 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), - // new InterpolateHtmlPlugin(process.env), + new InterpolateHtmlPlugin(process.env), new CopyWebpackPlugin([ { from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-lite.js') }, { from: require.resolve('@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js') }, diff --git a/app/react-native/package.json b/app/react-native/package.json index 3060e03564e3..b0139325ed8e 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -49,11 +49,11 @@ "find-cache-dir": "^1.0.0", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.6", + "html-webpack-plugin": "^3.0.7", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", - "react-dev-utils": "^5.0.0", + "react-dev-utils": "zanettin/react-dev-utils", "react-native-compat": "^1.0.0", "react-native-iphone-x-helper": "^1.0.2", "shelljs": "^0.8.1", diff --git a/app/react-native/src/server/config/webpack.config.js b/app/react-native/src/server/config/webpack.config.js index 3f6d8c98c158..9979277ae43b 100644 --- a/app/react-native/src/server/config/webpack.config.js +++ b/app/react-native/src/server/config/webpack.config.js @@ -1,9 +1,9 @@ import path from 'path'; import webpack from 'webpack'; -// import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; +import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; -import { includePaths, excludePaths } from './utils'; +import { includePaths, excludePaths, nodeModulesPaths } from './utils'; const getConfig = options => ({ mode: 'development', @@ -26,7 +26,7 @@ const getConfig = options => ({ }), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), - // new WatchMissingNodeModulesPlugin(nodeModulesPaths), + new WatchMissingNodeModulesPlugin(nodeModulesPaths), ], module: { rules: [ diff --git a/app/react/package.json b/app/react/package.json index fb827fe66955..e93f112b180d 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -51,12 +51,12 @@ "glamorous": "^4.12.1", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.6", + "html-webpack-plugin": "^3.0.7", "json5": "^0.5.1", "lodash.flattendeep": "^4.4.0", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", - "react-dev-utils": "^6.0.0-next.47d2d941", + "react-dev-utils": "zanettin/react-dev-utils", "redux": "^3.7.2", "util-deprecate": "^1.0.2", "webpack": "^4.1.1", diff --git a/app/react/src/server/config/webpack.config.js b/app/react/src/server/config/webpack.config.js index 7e796e165a47..e73f4843841f 100644 --- a/app/react/src/server/config/webpack.config.js +++ b/app/react/src/server/config/webpack.config.js @@ -1,13 +1,13 @@ import path from 'path'; import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; -// import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; +import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, loadEnv, nodePaths } from './utils'; +import { includePaths, excludePaths, loadEnv, nodePaths, nodeModulesPaths } from './utils'; import babelLoaderConfig from './babel'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import { version } from '../../../package.json'; @@ -47,11 +47,11 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), - // new InterpolateHtmlPlugin(process.env), + new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv()), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), - // new WatchMissingNodeModulesPlugin(nodeModulesPaths), + new WatchMissingNodeModulesPlugin(nodeModulesPaths), new webpack.ProgressPlugin(), new Dotenv({ silent: true }), ], diff --git a/app/react/src/server/config/webpack.config.prod.js b/app/react/src/server/config/webpack.config.prod.js index 9ceb92fde77d..cf4a52274623 100644 --- a/app/react/src/server/config/webpack.config.prod.js +++ b/app/react/src/server/config/webpack.config.prod.js @@ -1,6 +1,6 @@ import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; import babelLoaderConfig from './babel.prod'; @@ -46,7 +46,7 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), - // new InterpolateHtmlPlugin(process.env), + new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv({ production: true })), new Dotenv({ silent: true }), ], diff --git a/app/vue/package.json b/app/vue/package.json index 99c1d0e8db80..ae341c7ef0a0 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -43,11 +43,11 @@ "find-cache-dir": "^1.0.0", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.6", + "html-webpack-plugin": "^3.0.7", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "react": "^16.2.0", - "react-dev-utils": "^5.0.0", + "react-dev-utils": "zanettin/react-dev-utils", "react-dom": "^16.2.0", "redux": "^3.7.2", "util-deprecate": "^1.0.2", diff --git a/app/vue/src/server/config/webpack.config.js b/app/vue/src/server/config/webpack.config.js index c15f90263292..0b037b564edc 100644 --- a/app/vue/src/server/config/webpack.config.js +++ b/app/vue/src/server/config/webpack.config.js @@ -1,13 +1,13 @@ import path from 'path'; import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; -// import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; +import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, loadEnv, nodePaths } from './utils'; +import { includePaths, excludePaths, loadEnv, nodePaths, nodeModulesPaths } from './utils'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import babelLoaderConfig from './babel'; import { version } from '../../../package.json'; @@ -47,11 +47,11 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), - // new InterpolateHtmlPlugin(process.env), + new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv()), new webpack.HotModuleReplacementPlugin(), new CaseSensitivePathsPlugin(), - // new WatchMissingNodeModulesPlugin(nodeModulesPaths), + new WatchMissingNodeModulesPlugin(nodeModulesPaths), new webpack.ProgressPlugin(), new Dotenv({ silent: true }), ], diff --git a/app/vue/src/server/config/webpack.config.prod.js b/app/vue/src/server/config/webpack.config.prod.js index 0259ae884e5b..05a2f07794b4 100644 --- a/app/vue/src/server/config/webpack.config.prod.js +++ b/app/vue/src/server/config/webpack.config.prod.js @@ -1,6 +1,6 @@ import webpack from 'webpack'; import Dotenv from 'dotenv-webpack'; -// import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; import babelLoaderConfig from './babel.prod'; @@ -46,7 +46,7 @@ export default function(configDir) { }, template: require.resolve('../iframe.html.ejs'), }), - // new InterpolateHtmlPlugin(process.env), + new InterpolateHtmlPlugin(process.env), new webpack.DefinePlugin(loadEnv({ production: true })), new Dotenv({ silent: true }), ], diff --git a/examples/official-storybook/config.js b/examples/official-storybook/config.js index 0194c8e3f0c9..f388cb40c7dc 100644 --- a/examples/official-storybook/config.js +++ b/examples/official-storybook/config.js @@ -6,8 +6,7 @@ import addHeadWarning from './head-warning'; import extraViewports from './extra-viewports.json'; addHeadWarning('Preview head not loaded', 'preview-head-not-loaded'); -// TODO enable back after react-dev-utils release, see https://github.com/facebook/create-react-app/pull/4077 -// addHeadWarning('Dotenv file not loaded', 'dotenv-file-not-loaded'); +addHeadWarning('Dotenv file not loaded', 'dotenv-file-not-loaded'); setOptions({ hierarchySeparator: /\/|\./, diff --git a/examples/polymer-cli/package.json b/examples/polymer-cli/package.json index ce3015be746f..deb0a03a15fc 100644 --- a/examples/polymer-cli/package.json +++ b/examples/polymer-cli/package.json @@ -27,7 +27,7 @@ "babel-loader": "^7.1.4", "babel-runtime": "^6.26.0", "copy-webpack-plugin": "^4.5.1", - "html-webpack-plugin": "^3.0.6", + "html-webpack-plugin": "^3.0.7", "webpack-dev-server": "^3.1.1" } } diff --git a/lib/core/package.json b/lib/core/package.json index a9987381eca6..3ffffd3d0ef9 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -34,7 +34,7 @@ "global": "^4.3.2", "json-loader": "^0.5.7", "postcss-flexbugs-fixes": "^3.2.0", - "postcss-loader": "^2.1.2", + "postcss-loader": "^2.1.3", "prop-types": "^15.6.1", "qs": "^6.5.1", "react": "^16.0.0", diff --git a/yarn.lock b/yarn.lock index 605fa534ba3b..8c26a0424934 100644 --- a/yarn.lock +++ b/yarn.lock @@ -137,14 +137,6 @@ dependencies: tslib "^1.7.1" -"@babel/code-frame@7.0.0-beta.38": - version "7.0.0-beta.38" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.38.tgz#c0af5930617e55e050336838e3a3670983b0b2b2" - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - "@babel/code-frame@7.0.0-beta.40", "@babel/code-frame@^7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6" @@ -222,6 +214,13 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" +"@mrmlnc/readdir-enhanced@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + dependencies: + call-me-maybe "^1.0.1" + glob-to-regexp "^0.3.0" + "@ngrx/store@^5.2.0": version "5.2.0" resolved "https://registry.yarnpkg.com/@ngrx/store/-/store-5.2.0.tgz#627ed74c9cd95462930485d912a557117b23903e" @@ -1138,7 +1137,7 @@ babel-cli@^6.26.0: optionalDependencies: chokidar "^1.6.1" -babel-code-frame@6.26.0, babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: @@ -2577,7 +2576,7 @@ bplist-parser@0.1.1: dependencies: big-integer "^1.6.7" -brace-expansion@^1.0.0, brace-expansion@^1.1.7: +brace-expansion@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" dependencies: @@ -2764,12 +2763,12 @@ browserify@^14.5.0: vm-browserify "~0.0.1" xtend "^4.0.0" -browserslist@2.11.3, browserslist@^2.11.3: - version "2.11.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" +browserslist@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.1.1.tgz#d380fc048bc3a33e60fb87dc135110ebaaa6320a" dependencies: - caniuse-lite "^1.0.30000792" - electron-to-chromium "^1.3.30" + caniuse-lite "^1.0.30000809" + electron-to-chromium "^1.3.33" browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: version "1.7.7" @@ -2785,6 +2784,13 @@ browserslist@^2.1.2, browserslist@^2.11.1, browserslist@^2.5.1: caniuse-lite "^1.0.30000789" electron-to-chromium "^1.3.30" +browserslist@^2.11.3: + version "2.11.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2" + dependencies: + caniuse-lite "^1.0.30000792" + electron-to-chromium "^1.3.30" + bser@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" @@ -2967,6 +2973,10 @@ call-limit@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.0.tgz#6fd61b03f3da42a2cd0ec2b60f02bd0e71991fea" +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" @@ -3036,6 +3046,10 @@ caniuse-lite@^1.0.30000792, caniuse-lite@^1.0.30000805: version "1.0.30000809" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000809.tgz#1e12c1344b8f74d56737ee2614bcedb648943479" +caniuse-lite@^1.0.30000809: + version "1.0.30000815" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000815.tgz#3a4258e6850362185adb11b0d754a48402d35bf6" + capture-stack-trace@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" @@ -3091,15 +3105,7 @@ chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@2.3.0, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - -chalk@^2.3.1: +chalk@2.3.1, chalk@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" dependencies: @@ -3107,6 +3113,14 @@ chalk@^2.3.1: escape-string-regexp "^1.0.5" supports-color "^5.2.0" +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + chalk@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" @@ -4176,11 +4190,13 @@ cross-fetch@1.1.1: node-fetch "1.7.3" whatwg-fetch "2.0.3" -cross-spawn@5.1.0, cross-spawn@^5.0.1, cross-spawn@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" +cross-spawn@6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.4.tgz#bbf44ccb30fb8314a08f178b62290c669c36d808" dependencies: - lru-cache "^4.0.1" + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" shebang-command "^1.2.0" which "^1.2.9" @@ -4198,6 +4214,14 @@ cross-spawn@^4.0.2: lru-cache "^4.0.1" which "^1.2.9" +cross-spawn@^5.0.1, cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -4973,6 +4997,10 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30: dependencies: electron-releases "^2.1.0" +electron-to-chromium@^1.3.33: + version "1.3.39" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.39.tgz#d7a4696409ca0995e2750156da612c221afad84d" + elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" @@ -5973,6 +6001,16 @@ fast-diff@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" +fast-glob@^2.0.2: + version "2.2.0" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.0.tgz#e9d032a69b86bef46fc03d935408f02fb211d9fc" + dependencies: + "@mrmlnc/readdir-enhanced" "^2.2.1" + glob-parent "^3.1.0" + is-glob "^4.0.0" + merge2 "^1.2.1" + micromatch "^3.1.8" + fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -6106,9 +6144,9 @@ fileset@^2.0.2: glob "^7.0.3" minimatch "^3.0.3" -filesize@3.5.11: - version "3.5.11" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee" +filesize@3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.0.tgz#22d079615624bb6fd3c04026120628a41b3f4efa" fill-range@^2.1.0: version "2.2.3" @@ -6201,6 +6239,12 @@ find-cache-dir@^1.0.0: make-dir "^1.0.0" pkg-dir "^2.0.0" +find-file-up@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/find-file-up/-/find-file-up-1.0.2.tgz#4d53664bc128cf793901497f4b13558d979755ca" + dependencies: + resolve-dir "^1.0.0" + find-index@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" @@ -6209,6 +6253,12 @@ find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" +find-pkg@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-pkg/-/find-pkg-1.0.0.tgz#96db242e001c7c55025d32213302ea3aba677177" + dependencies: + find-file-up "^1.0.2" + find-root@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" @@ -6701,6 +6751,10 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + glob2base@^0.0.12: version "0.0.12" resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" @@ -6778,6 +6832,18 @@ globals@^9.17.0, globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" +globby@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50" + dependencies: + array-union "^1.0.1" + dir-glob "^2.0.0" + fast-glob "^2.0.2" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" @@ -7000,12 +7066,6 @@ gulplog@^1.0.0: dependencies: glogg "^1.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: - duplexer "^0.1.1" - gzip-size@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-4.1.0.tgz#8ae096257eabe7d69c45be2b67c448124ffb517c" @@ -7341,9 +7401,9 @@ html-webpack-plugin@^2.29.0: pretty-error "^2.0.2" toposort "^1.0.0" -html-webpack-plugin@^3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.0.6.tgz#d35b0452aae129a8a9f3fac44a169a625d8cf3fa" +html-webpack-plugin@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.0.7.tgz#b46074f6a76e791581ffe9bb059a72b452d99907" dependencies: html-minifier "^3.2.3" loader-utils "^0.2.16" @@ -7676,28 +7736,9 @@ inline-style-prefixer@^3.0.6: bowser "^1.7.3" css-in-js-utils "^2.0.0" -inquirer@3.3.0, inquirer@^3.0.6, inquirer@^3.2.2: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.0.4" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - -inquirer@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.0.0.tgz#261b77cdb535495509f1b90197108ffb96c02db5" +inquirer@5.1.0, inquirer@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.1.0.tgz#19da508931892328abbbdd4c477f1efc65abfd67" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" @@ -7731,20 +7772,21 @@ inquirer@^0.11.0: strip-ansi "^3.0.0" through "^2.3.6" -inquirer@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.1.0.tgz#19da508931892328abbbdd4c477f1efc65abfd67" +inquirer@^3.0.6, inquirer@^3.2.2: + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^2.1.0" + external-editor "^2.0.4" figures "^2.0.0" lodash "^4.3.0" mute-stream "0.0.7" run-async "^2.2.0" - rxjs "^5.5.2" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" string-width "^2.1.0" strip-ansi "^4.0.0" through "^2.3.6" @@ -10224,6 +10266,10 @@ merge-stream@^1.0.1: dependencies: readable-stream "^2.0.1" +merge2@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.1.tgz#271d2516ff52d4af7f7b710b8bf3e16e183fef66" + merge@^1.1.3: version "1.2.0" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" @@ -10427,18 +10473,12 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: brace-expansion "^1.1.7" -minimatch@3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - dependencies: - brace-expansion "^1.0.0" - minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -12073,9 +12113,9 @@ postcss-loader@^2.0.10: postcss-load-config "^1.2.0" schema-utils "^0.3.0" -postcss-loader@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.1.2.tgz#03f54e23be736c9ea4f610e17d2a299254c05130" +postcss-loader@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.1.3.tgz#eb210da734e475a244f76ccd61f9860f5bb3ee09" dependencies: loader-utils "^1.1.0" postcss "^6.0.0" @@ -12785,49 +12825,28 @@ react-deep-force-update@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.1.1.tgz#bcd31478027b64b3339f108921ab520b4313dc2c" -react-dev-utils@^5.0.0: +react-dev-utils@^5.0.0, react-dev-utils@zanettin/react-dev-utils: version "5.0.0" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-5.0.0.tgz#425ac7c9c40c2603bc4f7ab8836c1406e96bb473" - dependencies: - address "1.0.3" - babel-code-frame "6.26.0" - chalk "1.1.3" - cross-spawn "5.1.0" - detect-port-alt "1.1.5" - escape-string-regexp "1.0.5" - filesize "3.5.11" - global-modules "1.0.0" - gzip-size "3.0.0" - inquirer "3.3.0" - is-root "1.0.0" - opn "5.2.0" - react-error-overlay "^4.0.0" - recursive-readdir "2.2.1" - shell-quote "1.6.1" - sockjs-client "1.1.4" - strip-ansi "3.0.1" - text-table "0.2.0" - -react-dev-utils@^6.0.0-next.47d2d941: - version "6.0.0-next.9754a231" - resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-6.0.0-next.9754a231.tgz#64d5a9de21b30a34cbd2138bd4bd3051379a7d77" + resolved "https://codeload.github.com/zanettin/react-dev-utils/tar.gz/7a8cd932dcb2025daca6a907a404613d5c2ae086" dependencies: - "@babel/code-frame" "7.0.0-beta.38" + "@babel/code-frame" "7.0.0-beta.40" address "1.0.3" - browserslist "2.11.3" - chalk "2.3.0" - cross-spawn "5.1.0" + browserslist "3.1.1" + chalk "2.3.1" + cross-spawn "6.0.4" detect-port-alt "1.1.5" escape-string-regexp "1.0.5" - filesize "3.5.11" + filesize "3.6.0" + find-pkg "1.0.0" global-modules "1.0.0" + globby "8.0.1" gzip-size "4.1.0" - inquirer "5.0.0" + inquirer "5.1.0" is-root "1.0.0" opn "5.2.0" pkg-up "2.0.0" - react-error-overlay "5.0.0-next.9754a231" - recursive-readdir "2.2.1" + react-error-overlay "^4.0.0" + recursive-readdir "2.2.2" shell-quote "1.6.1" sockjs-client "1.1.4" strip-ansi "4.0.0" @@ -12861,10 +12880,6 @@ react-dom@^16.0.0, react-dom@^16.1.0, react-dom@^16.2.0: object-assign "^4.1.1" prop-types "^15.6.0" -react-error-overlay@5.0.0-next.9754a231: - version "5.0.0-next.9754a231" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.0.0-next.9754a231.tgz#4af836bc7a605f23972b95367c895c7d7577067e" - react-error-overlay@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-4.0.0.tgz#d198408a85b4070937a98667f500c832f86bd5d4" @@ -13375,11 +13390,11 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -recursive-readdir@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.1.tgz#90ef231d0778c5ce093c9a48d74e5c5422d13a99" +recursive-readdir@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" dependencies: - minimatch "3.0.3" + minimatch "3.0.4" redent@^1.0.0: version "1.0.0" @@ -15140,12 +15155,6 @@ stringstream@~0.0.4, stringstream@~0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" -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: - ansi-regex "^2.0.0" - strip-ansi@4.0.0, strip-ansi@^4.0.0, strip-ansi@~4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" @@ -15158,6 +15167,12 @@ strip-ansi@^0.3.0: dependencies: ansi-regex "^0.2.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: + ansi-regex "^2.0.0" + strip-ansi@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" From 6f31eb415eff78739c95f9ba226ec0cccfe2bd4d Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Fri, 23 Mar 2018 12:11:15 +0300 Subject: [PATCH 08/11] Revert named imports order change --- app/angular/src/server/config/webpack.config.js | 2 +- app/polymer/src/server/config/webpack.config.js | 2 +- app/react/src/server/config/webpack.config.js | 2 +- app/vue/src/server/config/webpack.config.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/angular/src/server/config/webpack.config.js b/app/angular/src/server/config/webpack.config.js index 858cff1d980d..b194ee0c671d 100644 --- a/app/angular/src/server/config/webpack.config.js +++ b/app/angular/src/server/config/webpack.config.js @@ -7,7 +7,7 @@ import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, loadEnv, nodePaths, nodeModulesPaths } from './utils'; +import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from './utils'; import babelLoaderConfig from './babel'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import { version } from '../../../package.json'; diff --git a/app/polymer/src/server/config/webpack.config.js b/app/polymer/src/server/config/webpack.config.js index f78e4cd2d283..b54c40221544 100644 --- a/app/polymer/src/server/config/webpack.config.js +++ b/app/polymer/src/server/config/webpack.config.js @@ -8,7 +8,7 @@ import HtmlWebpackPlugin from 'html-webpack-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, loadEnv, nodePaths, nodeModulesPaths } from './utils'; +import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from './utils'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import babelLoaderConfig from './babel'; import { version } from '../../../package.json'; diff --git a/app/react/src/server/config/webpack.config.js b/app/react/src/server/config/webpack.config.js index e73f4843841f..056565dc92bc 100644 --- a/app/react/src/server/config/webpack.config.js +++ b/app/react/src/server/config/webpack.config.js @@ -7,7 +7,7 @@ import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, loadEnv, nodePaths, nodeModulesPaths } from './utils'; +import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from './utils'; import babelLoaderConfig from './babel'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import { version } from '../../../package.json'; diff --git a/app/vue/src/server/config/webpack.config.js b/app/vue/src/server/config/webpack.config.js index 0b037b564edc..df6ab4bc4edb 100644 --- a/app/vue/src/server/config/webpack.config.js +++ b/app/vue/src/server/config/webpack.config.js @@ -7,7 +7,7 @@ import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import { managerPath } from '@storybook/core/server'; -import { includePaths, excludePaths, loadEnv, nodePaths, nodeModulesPaths } from './utils'; +import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from './utils'; import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils'; import babelLoaderConfig from './babel'; import { version } from '../../../package.json'; From ba89b47070a93986af473e19709e5a7394a8c12e Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Mon, 26 Mar 2018 12:41:13 +0300 Subject: [PATCH 09/11] Use published fork of react-dev-utils --- app/angular/package.json | 2 +- app/polymer/package.json | 2 +- app/react-native/package.json | 2 +- app/react/package.json | 2 +- app/vue/package.json | 2 +- yarn.lock | 98 ++++++++++++++++++++++++++++------- 6 files changed, 83 insertions(+), 25 deletions(-) diff --git a/app/angular/package.json b/app/angular/package.json index 9a429ed744d6..068d823bfcb9 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -47,7 +47,7 @@ "node-sass": "^4.8.3", "raw-loader": "^0.5.1", "react": "^16.0.0", - "react-dev-utils": "zanettin/react-dev-utils", + "@storybook/react-dev-utils": "^5.0.0", "react-dom": "^16.0.0", "sass-loader": "^6.0.7", "ts-loader": "^4.1.0", diff --git a/app/polymer/package.json b/app/polymer/package.json index a4c00ae85e66..4b51a4252500 100644 --- a/app/polymer/package.json +++ b/app/polymer/package.json @@ -49,7 +49,7 @@ "html-webpack-plugin": "^3.0.7", "json5": "^0.5.1", "react": "^16.0.0", - "react-dev-utils": "zanettin/react-dev-utils", + "@storybook/react-dev-utils": "^5.0.0", "react-dom": "^16.0.0", "util-deprecate": "^1.0.2", "webpack": "^4.1.1", diff --git a/app/react-native/package.json b/app/react-native/package.json index 1416849c0144..ffe7b6a13aa5 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -53,7 +53,7 @@ "json5": "^0.5.1", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", - "react-dev-utils": "zanettin/react-dev-utils", + "@storybook/react-dev-utils": "^5.0.0", "react-native-compat": "^1.0.0", "react-native-iphone-x-helper": "^1.0.2", "shelljs": "^0.8.1", diff --git a/app/react/package.json b/app/react/package.json index c17278273593..868c11b0e03e 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -56,7 +56,7 @@ "lodash.flattendeep": "^4.4.0", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", - "react-dev-utils": "zanettin/react-dev-utils", + "@storybook/react-dev-utils": "^5.0.0", "util-deprecate": "^1.0.2", "webpack": "^4.1.1", "webpack-hot-middleware": "^2.21.2" diff --git a/app/vue/package.json b/app/vue/package.json index 29029e982305..54ea77108025 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -47,7 +47,7 @@ "json5": "^0.5.1", "markdown-loader": "^2.0.2", "react": "^16.2.0", - "react-dev-utils": "zanettin/react-dev-utils", + "@storybook/react-dev-utils": "^5.0.0", "react-dom": "^16.2.0", "util-deprecate": "^1.0.2", "webpack": "^4.1.1", diff --git a/yarn.lock b/yarn.lock index b0e4aadfea12..7bd39f47e0e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -143,6 +143,12 @@ dependencies: "@babel/highlight" "7.0.0-beta.40" +"@babel/code-frame@7.0.0-beta.42": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.42.tgz#a9c83233fa7cd06b39dc77adbb908616ff4f1962" + dependencies: + "@babel/highlight" "7.0.0-beta.42" + "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.37" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.37.tgz#2da1dd3b1b57bfdea777ddc378df7cd12fe40171" @@ -183,6 +189,14 @@ esutils "^2.0.2" js-tokens "^3.0.0" +"@babel/highlight@7.0.0-beta.42": + version "7.0.0-beta.42" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.42.tgz#a502a1c0d6f99b2b0e81d468a1b0c0e81e3f3623" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + "@babel/template@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.40.tgz#034988c6424eb5c3268fe6a608626de1f4410fc8" @@ -290,6 +304,33 @@ babel-runtime "^6.11.6" immutable "^3.8.1" +"@storybook/react-dev-utils@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@storybook/react-dev-utils/-/react-dev-utils-5.0.0.tgz#d33a6baf480a980e135c21ade859632aca20fe78" + dependencies: + "@babel/code-frame" "7.0.0-beta.42" + address "1.0.3" + browserslist "3.2.0" + chalk "2.3.2" + cross-spawn "6.0.5" + detect-port-alt "1.1.5" + escape-string-regexp "1.0.5" + filesize "3.6.0" + find-pkg "1.0.0" + global-modules "1.0.0" + globby "8.0.1" + gzip-size "4.1.0" + inquirer "5.1.0" + is-root "1.0.0" + opn "5.3.0" + pkg-up "2.0.0" + react-error-overlay "^4.0.0" + recursive-readdir "2.2.2" + shell-quote "1.6.1" + sockjs-client "1.1.4" + strip-ansi "4.0.0" + text-table "0.2.0" + "@storybook/react-komposer@^2.0.1", "@storybook/react-komposer@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@storybook/react-komposer/-/react-komposer-2.0.3.tgz#f9e12a9586b2ce95c24c137eabb8b71527ddb369" @@ -2705,6 +2746,13 @@ browserslist@3.1.1: caniuse-lite "^1.0.30000809" electron-to-chromium "^1.3.33" +browserslist@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.0.tgz#3d4a99710c12101e4567c9aeedade49c958cb883" + dependencies: + caniuse-lite "^1.0.30000815" + electron-to-chromium "^1.3.39" + browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: version "1.7.7" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" @@ -2981,6 +3029,10 @@ caniuse-lite@^1.0.30000809: version "1.0.30000815" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000815.tgz#3a4258e6850362185adb11b0d754a48402d35bf6" +caniuse-lite@^1.0.30000815: + version "1.0.30000820" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000820.tgz#6e36ee75187a2c83d26d6504a1af47cc580324d2" + caniuse-lite@^1.0.30000817, caniuse-lite@^1.0.30000819: version "1.0.30000819" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000819.tgz#aabee5fd15a080febab6ae5d30c9ea15f4c6d4e2" @@ -3048,6 +3100,14 @@ chalk@2.3.1, chalk@^2.3.1: escape-string-regexp "^1.0.5" supports-color "^5.2.0" +chalk@2.3.2, chalk@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" @@ -3056,14 +3116,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" -chalk@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" @@ -4135,6 +4187,16 @@ cross-spawn@6.0.4: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@6.0.5, cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + cross-spawn@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" @@ -4157,16 +4219,6 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -4932,7 +4984,7 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30: dependencies: electron-releases "^2.1.0" -electron-to-chromium@^1.3.33, electron-to-chromium@^1.3.40: +electron-to-chromium@^1.3.33, electron-to-chromium@^1.3.39, electron-to-chromium@^1.3.40: version "1.3.40" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.40.tgz#1fbd6d97befd72b8a6f921dc38d22413d2f6fddf" @@ -11492,6 +11544,12 @@ opn@5.2.0: dependencies: is-wsl "^1.1.0" +opn@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" + dependencies: + is-wsl "^1.1.0" + opn@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/opn/-/opn-3.0.3.tgz#b6d99e7399f78d65c3baaffef1fb288e9b85243a" @@ -12904,7 +12962,7 @@ react-deep-force-update@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.1.1.tgz#bcd31478027b64b3339f108921ab520b4313dc2c" -react-dev-utils@^5.0.0, react-dev-utils@zanettin/react-dev-utils: +react-dev-utils@^5.0.0: version "5.0.0" resolved "https://codeload.github.com/zanettin/react-dev-utils/tar.gz/7a8cd932dcb2025daca6a907a404613d5c2ae086" dependencies: From 48b92e6bca1952dae47156a7ce8088914b733ea8 Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Mon, 26 Mar 2018 20:56:16 +0300 Subject: [PATCH 10/11] Use original react-dev-utils --- app/angular/package.json | 2 +- app/polymer/package.json | 2 +- app/react-native/package.json | 2 +- app/react/package.json | 2 +- app/vue/package.json | 2 +- yarn.lock | 96 +++++++---------------------------- 6 files changed, 24 insertions(+), 82 deletions(-) diff --git a/app/angular/package.json b/app/angular/package.json index 068d823bfcb9..f485c634e9e7 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -47,7 +47,7 @@ "node-sass": "^4.8.3", "raw-loader": "^0.5.1", "react": "^16.0.0", - "@storybook/react-dev-utils": "^5.0.0", + "react-dev-utils": "^5.0.0", "react-dom": "^16.0.0", "sass-loader": "^6.0.7", "ts-loader": "^4.1.0", diff --git a/app/polymer/package.json b/app/polymer/package.json index 4b51a4252500..9a275e5073ce 100644 --- a/app/polymer/package.json +++ b/app/polymer/package.json @@ -49,7 +49,7 @@ "html-webpack-plugin": "^3.0.7", "json5": "^0.5.1", "react": "^16.0.0", - "@storybook/react-dev-utils": "^5.0.0", + "react-dev-utils": "^5.0.0", "react-dom": "^16.0.0", "util-deprecate": "^1.0.2", "webpack": "^4.1.1", diff --git a/app/react-native/package.json b/app/react-native/package.json index ffe7b6a13aa5..c823a69a2f7c 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -53,7 +53,7 @@ "json5": "^0.5.1", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", - "@storybook/react-dev-utils": "^5.0.0", + "react-dev-utils": "^5.0.0", "react-native-compat": "^1.0.0", "react-native-iphone-x-helper": "^1.0.2", "shelljs": "^0.8.1", diff --git a/app/react/package.json b/app/react/package.json index 868c11b0e03e..1fc49d124f95 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -56,7 +56,7 @@ "lodash.flattendeep": "^4.4.0", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", - "@storybook/react-dev-utils": "^5.0.0", + "react-dev-utils": "^5.0.0", "util-deprecate": "^1.0.2", "webpack": "^4.1.1", "webpack-hot-middleware": "^2.21.2" diff --git a/app/vue/package.json b/app/vue/package.json index 54ea77108025..4c07e082a6c5 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -47,7 +47,7 @@ "json5": "^0.5.1", "markdown-loader": "^2.0.2", "react": "^16.2.0", - "@storybook/react-dev-utils": "^5.0.0", + "react-dev-utils": "^5.0.0", "react-dom": "^16.2.0", "util-deprecate": "^1.0.2", "webpack": "^4.1.1", diff --git a/yarn.lock b/yarn.lock index 7bd39f47e0e2..408c1ac8617e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -143,12 +143,6 @@ dependencies: "@babel/highlight" "7.0.0-beta.40" -"@babel/code-frame@7.0.0-beta.42": - version "7.0.0-beta.42" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.42.tgz#a9c83233fa7cd06b39dc77adbb908616ff4f1962" - dependencies: - "@babel/highlight" "7.0.0-beta.42" - "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.37" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.37.tgz#2da1dd3b1b57bfdea777ddc378df7cd12fe40171" @@ -189,14 +183,6 @@ esutils "^2.0.2" js-tokens "^3.0.0" -"@babel/highlight@7.0.0-beta.42": - version "7.0.0-beta.42" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.42.tgz#a502a1c0d6f99b2b0e81d468a1b0c0e81e3f3623" - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - "@babel/template@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.40.tgz#034988c6424eb5c3268fe6a608626de1f4410fc8" @@ -304,33 +290,6 @@ babel-runtime "^6.11.6" immutable "^3.8.1" -"@storybook/react-dev-utils@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@storybook/react-dev-utils/-/react-dev-utils-5.0.0.tgz#d33a6baf480a980e135c21ade859632aca20fe78" - dependencies: - "@babel/code-frame" "7.0.0-beta.42" - address "1.0.3" - browserslist "3.2.0" - chalk "2.3.2" - cross-spawn "6.0.5" - detect-port-alt "1.1.5" - escape-string-regexp "1.0.5" - filesize "3.6.0" - find-pkg "1.0.0" - global-modules "1.0.0" - globby "8.0.1" - gzip-size "4.1.0" - inquirer "5.1.0" - is-root "1.0.0" - opn "5.3.0" - pkg-up "2.0.0" - react-error-overlay "^4.0.0" - recursive-readdir "2.2.2" - shell-quote "1.6.1" - sockjs-client "1.1.4" - strip-ansi "4.0.0" - text-table "0.2.0" - "@storybook/react-komposer@^2.0.1", "@storybook/react-komposer@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@storybook/react-komposer/-/react-komposer-2.0.3.tgz#f9e12a9586b2ce95c24c137eabb8b71527ddb369" @@ -2746,13 +2705,6 @@ browserslist@3.1.1: caniuse-lite "^1.0.30000809" electron-to-chromium "^1.3.33" -browserslist@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.0.tgz#3d4a99710c12101e4567c9aeedade49c958cb883" - dependencies: - caniuse-lite "^1.0.30000815" - electron-to-chromium "^1.3.39" - browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: version "1.7.7" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" @@ -3029,10 +2981,6 @@ caniuse-lite@^1.0.30000809: version "1.0.30000815" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000815.tgz#3a4258e6850362185adb11b0d754a48402d35bf6" -caniuse-lite@^1.0.30000815: - version "1.0.30000820" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000820.tgz#6e36ee75187a2c83d26d6504a1af47cc580324d2" - caniuse-lite@^1.0.30000817, caniuse-lite@^1.0.30000819: version "1.0.30000819" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000819.tgz#aabee5fd15a080febab6ae5d30c9ea15f4c6d4e2" @@ -3100,14 +3048,6 @@ chalk@2.3.1, chalk@^2.3.1: escape-string-regexp "^1.0.5" supports-color "^5.2.0" -chalk@2.3.2, chalk@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" @@ -3116,6 +3056,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" +chalk@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" @@ -4187,16 +4135,6 @@ cross-spawn@6.0.4: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@6.0.5, cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - cross-spawn@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" @@ -4219,6 +4157,16 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -4984,7 +4932,7 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30: dependencies: electron-releases "^2.1.0" -electron-to-chromium@^1.3.33, electron-to-chromium@^1.3.39, electron-to-chromium@^1.3.40: +electron-to-chromium@^1.3.33, electron-to-chromium@^1.3.40: version "1.3.40" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.40.tgz#1fbd6d97befd72b8a6f921dc38d22413d2f6fddf" @@ -11544,12 +11492,6 @@ opn@5.2.0: dependencies: is-wsl "^1.1.0" -opn@5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" - dependencies: - is-wsl "^1.1.0" - opn@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/opn/-/opn-3.0.3.tgz#b6d99e7399f78d65c3baaffef1fb288e9b85243a" From 530cc5990bb3f41177c4ce63aa715177dd5d98b9 Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Mon, 26 Mar 2018 21:10:28 +0300 Subject: [PATCH 11/11] Update webpack & friends --- app/angular/package.json | 4 ++-- app/polymer/package.json | 4 ++-- app/react-native/package.json | 4 ++-- app/react/package.json | 4 ++-- app/vue/package.json | 4 ++-- examples/cra-kitchen-sink/package.json | 2 +- examples/polymer-cli/package.json | 4 ++-- examples/vue-kitchen-sink/package.json | 2 +- lib/core/package.json | 2 +- yarn.lock | 12 ++++++------ 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/angular/package.json b/app/angular/package.json index f485c634e9e7..01cb49c57f03 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -41,7 +41,7 @@ "dotenv-webpack": "^1.5.5", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.7", + "html-webpack-plugin": "^3.1.0", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "node-sass": "^4.8.3", @@ -52,7 +52,7 @@ "sass-loader": "^6.0.7", "ts-loader": "^4.1.0", "util-deprecate": "^1.0.2", - "webpack": "^4.1.1", + "webpack": "^4.2.0", "webpack-hot-middleware": "^2.21.2", "zone.js": "^0.8.20" }, diff --git a/app/polymer/package.json b/app/polymer/package.json index 9a275e5073ce..a5951919fc3f 100644 --- a/app/polymer/package.json +++ b/app/polymer/package.json @@ -46,13 +46,13 @@ "dotenv-webpack": "^1.5.5", "find-cache-dir": "^1.0.0", "global": "^4.3.2", - "html-webpack-plugin": "^3.0.7", + "html-webpack-plugin": "^3.1.0", "json5": "^0.5.1", "react": "^16.0.0", "react-dev-utils": "^5.0.0", "react-dom": "^16.0.0", "util-deprecate": "^1.0.2", - "webpack": "^4.1.1", + "webpack": "^4.2.0", "webpack-hot-middleware": "^2.21.2" }, "devDependencies": { diff --git a/app/react-native/package.json b/app/react-native/package.json index c823a69a2f7c..c6a4a504a415 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -49,7 +49,7 @@ "find-cache-dir": "^1.0.0", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.7", + "html-webpack-plugin": "^3.1.0", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", @@ -60,7 +60,7 @@ "url-parse": "^1.1.9", "util-deprecate": "^1.0.2", "uuid": "^3.2.1", - "webpack": "^4.1.1", + "webpack": "^4.2.0", "webpack-dev-middleware": "^3.0.1", "webpack-hot-middleware": "^2.21.2", "ws": "^4.1.0" diff --git a/app/react/package.json b/app/react/package.json index 1fc49d124f95..62240634cfc1 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -51,14 +51,14 @@ "glamorous": "^4.12.1", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.7", + "html-webpack-plugin": "^3.1.0", "json5": "^0.5.1", "lodash.flattendeep": "^4.4.0", "markdown-loader": "^2.0.2", "prop-types": "^15.6.1", "react-dev-utils": "^5.0.0", "util-deprecate": "^1.0.2", - "webpack": "^4.1.1", + "webpack": "^4.2.0", "webpack-hot-middleware": "^2.21.2" }, "devDependencies": { diff --git a/app/vue/package.json b/app/vue/package.json index 4c07e082a6c5..17d61b322a87 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -43,14 +43,14 @@ "find-cache-dir": "^1.0.0", "global": "^4.3.2", "html-loader": "^0.5.5", - "html-webpack-plugin": "^3.0.7", + "html-webpack-plugin": "^3.1.0", "json5": "^0.5.1", "markdown-loader": "^2.0.2", "react": "^16.2.0", "react-dev-utils": "^5.0.0", "react-dom": "^16.2.0", "util-deprecate": "^1.0.2", - "webpack": "^4.1.1", + "webpack": "^4.2.0", "webpack-hot-middleware": "^2.21.2" }, "devDependencies": { diff --git a/examples/cra-kitchen-sink/package.json b/examples/cra-kitchen-sink/package.json index 1faca9294855..2471e72d9e12 100644 --- a/examples/cra-kitchen-sink/package.json +++ b/examples/cra-kitchen-sink/package.json @@ -38,6 +38,6 @@ "enzyme-to-json": "^3.3.3", "jest": "^20.0.4", "react-scripts": "^1.1.1", - "webpack": "^4.1.1" + "webpack": "^4.2.0" } } diff --git a/examples/polymer-cli/package.json b/examples/polymer-cli/package.json index e50932329010..f6eb056538cd 100644 --- a/examples/polymer-cli/package.json +++ b/examples/polymer-cli/package.json @@ -20,14 +20,14 @@ "@webcomponents/webcomponentsjs": "^1.1.1", "global": "^4.3.2", "polymer-webpack-loader": "^2.0.2", - "webpack": "^4.1.1" + "webpack": "^4.2.0" }, "devDependencies": { "babel-core": "^6.26.0", "babel-loader": "^7.1.4", "babel-runtime": "^6.26.0", "copy-webpack-plugin": "^4.5.1", - "html-webpack-plugin": "^3.0.7", + "html-webpack-plugin": "^3.1.0", "webpack-dev-server": "^3.1.1" } } diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index 141456eed9f0..7c4b7fffa96f 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -32,7 +32,7 @@ "file-loader": "^1.1.11", "svg-url-loader": "^2.3.2", "vue-loader": "^14.2.2", - "webpack": "^4.1.1", + "webpack": "^4.2.0", "webpack-dev-server": "^3.1.1" } } diff --git a/lib/core/package.json b/lib/core/package.json index b01e87541343..a0a8f4d0347a 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -45,7 +45,7 @@ "style-loader": "^0.20.3", "svg-url-loader": "^2.3.2", "url-loader": "^1.0.1", - "webpack": "^4.1.1", + "webpack": "^4.2.0", "webpack-dev-middleware": "^3.0.1", "webpack-hot-middleware": "^2.21.2" } diff --git a/yarn.lock b/yarn.lock index 408c1ac8617e..63799ca160ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7347,9 +7347,9 @@ html-webpack-plugin@^2.29.0: pretty-error "^2.0.2" toposort "^1.0.0" -html-webpack-plugin@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.0.7.tgz#b46074f6a76e791581ffe9bb059a72b452d99907" +html-webpack-plugin@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.1.0.tgz#6e02baaedb1e906310917f03239c793a75af2885" dependencies: html-minifier "^3.2.3" loader-utils "^0.2.16" @@ -16881,9 +16881,9 @@ webpack@3.8.1: webpack-sources "^1.0.1" yargs "^8.0.2" -webpack@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.1.1.tgz#44e4d6a869dd36fdfc0b227f9bd865a4bccfd81c" +webpack@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.2.0.tgz#a4f80807651a0e611bb09609600dc266262efcc1" dependencies: acorn "^5.0.0" acorn-dynamic-import "^3.0.0"