From b2b96e0b150b56d47fbe5ec1ef7727a13e86a899 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Thu, 7 Mar 2019 15:44:36 -0800 Subject: [PATCH] Add WarningsToErrorsPlugin to webpack to avoid missing build problems on CI (#9647) --- package.json | 1 + scripts/gulp-tasks.js | 2 ++ yarn.lock | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/package.json b/package.json index 642b2c72f5d8..df8daa79ea7a 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "through2": "^2.0.0", "vinyl-buffer": "^1.0.1", "vinyl-source-stream": "^2.0.0", + "warnings-to-errors-webpack-plugin": "^2.0.0", "webpack": "^3.4.1", "webpack-dependency-suite": "^2.4.4", "webpack-stream": "^4.0.0" diff --git a/scripts/gulp-tasks.js b/scripts/gulp-tasks.js index 6b52205342df..73c1f7db2e3f 100644 --- a/scripts/gulp-tasks.js +++ b/scripts/gulp-tasks.js @@ -20,6 +20,7 @@ const rename = require("gulp-rename"); const webpack = require("webpack"); const { RootMostResolvePlugin } = require("webpack-dependency-suite"); const DuplicatePackageCheckerPlugin = require("duplicate-package-checker-webpack-plugin"); +const WarningsToErrorsPlugin = require("warnings-to-errors-webpack-plugin"); const webpackStream = require("webpack-stream"); const uglify = require("gulp-uglify"); @@ -62,6 +63,7 @@ function webpackBuild(opts) { libraryTarget: "umd", }, plugins: [ + new WarningsToErrorsPlugin(), new DuplicatePackageCheckerPlugin({ exclude(instance) { return instance.name === "semver"; diff --git a/yarn.lock b/yarn.lock index 834058076f96..d81ac0996a5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9047,6 +9047,11 @@ walker@~1.0.5: dependencies: makeerror "1.0.x" +warnings-to-errors-webpack-plugin@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/warnings-to-errors-webpack-plugin/-/warnings-to-errors-webpack-plugin-2.0.0.tgz#1ce862fa845c77a3c21bb68c839efaa7ebbdb9fb" + integrity sha512-0Girb3F5xc5U1TpYMiLDcie5oB+Ko2EuujOYyS3aXpKS4Yp264WkIuJ+0vF8wnmkDkmZAOBxahBedEL0mLjHQA== + watch@~0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986"