Add duplicate-package-checker-webpack-plugin (#9517)
We are duplicating semver. It's such a small package that I don't think that it is worth spending much time trying to understand why.
This commit is contained in:
parent
0050266a50
commit
d86b831364
@ -30,6 +30,7 @@
|
|||||||
"chalk": "^2.3.2",
|
"chalk": "^2.3.2",
|
||||||
"charcodes": "^0.2.0",
|
"charcodes": "^0.2.0",
|
||||||
"derequire": "^2.0.2",
|
"derequire": "^2.0.2",
|
||||||
|
"duplicate-package-checker-webpack-plugin": "^2.1.0",
|
||||||
"enhanced-resolve": "^3.0.0",
|
"enhanced-resolve": "^3.0.0",
|
||||||
"eslint": "^5.12.1",
|
"eslint": "^5.12.1",
|
||||||
"eslint-config-babel": "^8.0.2",
|
"eslint-config-babel": "^8.0.2",
|
||||||
|
|||||||
@ -17,9 +17,9 @@ const chalk = require("chalk");
|
|||||||
const through = require("through2");
|
const through = require("through2");
|
||||||
const fancyLog = require("fancy-log");
|
const fancyLog = require("fancy-log");
|
||||||
const rename = require("gulp-rename");
|
const rename = require("gulp-rename");
|
||||||
const RootMostResolvePlugin = require("webpack-dependency-suite")
|
|
||||||
.RootMostResolvePlugin;
|
|
||||||
const webpack = require("webpack");
|
const webpack = require("webpack");
|
||||||
|
const { RootMostResolvePlugin } = require("webpack-dependency-suite");
|
||||||
|
const DuplicatePackageCheckerPlugin = require("duplicate-package-checker-webpack-plugin");
|
||||||
const webpackStream = require("webpack-stream");
|
const webpackStream = require("webpack-stream");
|
||||||
const uglify = require("gulp-uglify");
|
const uglify = require("gulp-uglify");
|
||||||
|
|
||||||
@ -62,6 +62,11 @@ function webpackBuild(opts) {
|
|||||||
libraryTarget: "umd",
|
libraryTarget: "umd",
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new DuplicatePackageCheckerPlugin({
|
||||||
|
exclude(instance) {
|
||||||
|
return instance.name === "semver";
|
||||||
|
},
|
||||||
|
}),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
"process.env.NODE_ENV": '"production"',
|
"process.env.NODE_ENV": '"production"',
|
||||||
"process.env": JSON.stringify({ NODE_ENV: "production" }),
|
"process.env": JSON.stringify({ NODE_ENV: "production" }),
|
||||||
@ -92,8 +97,11 @@ function webpackBuild(opts) {
|
|||||||
return webpackStream(config, webpack);
|
return webpackStream(config, webpack);
|
||||||
// To write JSON for debugging:
|
// To write JSON for debugging:
|
||||||
/*return webpackStream(config, webpack, (err, stats) => {
|
/*return webpackStream(config, webpack, (err, stats) => {
|
||||||
require('fancy-log')(stats.toString({colors: true}));
|
require("fancy-log")(stats.toString({ colors: true }));
|
||||||
require('fs').writeFileSync('webpack-debug.json', JSON.stringify(stats.toJson()));
|
require("fs").writeFileSync(
|
||||||
|
"webpack-debug.json",
|
||||||
|
JSON.stringify(stats.toJson())
|
||||||
|
);
|
||||||
});*/
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
24
yarn.lock
24
yarn.lock
@ -2239,6 +2239,15 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2:
|
|||||||
escape-string-regexp "^1.0.5"
|
escape-string-regexp "^1.0.5"
|
||||||
supports-color "^5.3.0"
|
supports-color "^5.3.0"
|
||||||
|
|
||||||
|
chalk@^2.3.0:
|
||||||
|
version "2.4.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
||||||
|
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
|
||||||
|
dependencies:
|
||||||
|
ansi-styles "^3.2.1"
|
||||||
|
escape-string-regexp "^1.0.5"
|
||||||
|
supports-color "^5.3.0"
|
||||||
|
|
||||||
chalk@^2.3.1, chalk@^2.4.1:
|
chalk@^2.3.1, chalk@^2.4.1:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
|
||||||
@ -3129,6 +3138,16 @@ duplexify@^3.4.2, duplexify@^3.6.0:
|
|||||||
readable-stream "^2.0.0"
|
readable-stream "^2.0.0"
|
||||||
stream-shift "^1.0.0"
|
stream-shift "^1.0.0"
|
||||||
|
|
||||||
|
duplicate-package-checker-webpack-plugin@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/duplicate-package-checker-webpack-plugin/-/duplicate-package-checker-webpack-plugin-2.1.0.tgz#6723ee32d89947997470778973c10788cb69e496"
|
||||||
|
integrity sha512-Blok+Cb8zDavYQyeTtSkmNp/aiyRn5+JV/4EhDDH5VJChnyIzPhq+S5MyWnFpqpv8jNKmD3cXmXFEVU509pzXQ==
|
||||||
|
dependencies:
|
||||||
|
chalk "^2.3.0"
|
||||||
|
find-root "^1.0.0"
|
||||||
|
lodash "^4.17.4"
|
||||||
|
semver "^5.4.1"
|
||||||
|
|
||||||
each-props@^1.3.0:
|
each-props@^1.3.0:
|
||||||
version "1.3.1"
|
version "1.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.1.tgz#fc138f51e3a2774286d4858e02d6e7de462de158"
|
resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.1.tgz#fc138f51e3a2774286d4858e02d6e7de462de158"
|
||||||
@ -3749,6 +3768,11 @@ find-parent-dir@^0.3.0:
|
|||||||
version "0.3.0"
|
version "0.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54"
|
resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54"
|
||||||
|
|
||||||
|
find-root@^1.0.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4"
|
||||||
|
integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==
|
||||||
|
|
||||||
find-up@^1.0.0:
|
find-up@^1.0.0:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
|
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user