mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
chore: add duplicate-package-checker-webpack-plugin (#31662)
* chore: fix deps * test: add duplicate-package-checker-webpack-plugin * test: should be broken * try webpack --bail * bail when emit error * revert rc-image
This commit is contained in:
parent
7f16838631
commit
70699fc711
@ -22,7 +22,11 @@ function finalizeCompile() {
|
||||
fs.readdir(componentsPath, (err, files) => {
|
||||
files.forEach(file => {
|
||||
if (fs.existsSync(path.join(componentsPath, file, 'style', 'index.less'))) {
|
||||
componentsLessContent += `@import "../${path.posix.join(file, 'style', 'index.less')}";\n`;
|
||||
componentsLessContent += `@import "../${path.posix.join(
|
||||
file,
|
||||
'style',
|
||||
'index.less',
|
||||
)}";\n`;
|
||||
}
|
||||
});
|
||||
fs.writeFileSync(
|
||||
@ -129,4 +133,5 @@ module.exports = {
|
||||
finalize: finalizeDist,
|
||||
},
|
||||
generateThemeFileContent,
|
||||
bail: true,
|
||||
};
|
||||
|
@ -124,7 +124,7 @@
|
||||
"rc-drawer": "~4.3.0",
|
||||
"rc-dropdown": "~3.2.0",
|
||||
"rc-field-form": "~1.20.0",
|
||||
"rc-image": "~5.2.4",
|
||||
"rc-image": "~5.2.5",
|
||||
"rc-input-number": "~7.1.0",
|
||||
"rc-mentions": "~1.6.1",
|
||||
"rc-menu": "~9.0.12",
|
||||
@ -148,13 +148,13 @@
|
||||
"rc-trigger": "^5.2.1",
|
||||
"rc-upload": "~4.3.0",
|
||||
"rc-util": "^5.13.1",
|
||||
"scroll-into-view-if-needed": "^2.2.25",
|
||||
"warning": "^4.0.3"
|
||||
"scroll-into-view-if-needed": "^2.2.25"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ant-design/bisheng-plugin": "^2.3.0",
|
||||
"@ant-design/hitu": "^0.0.0-alpha.13",
|
||||
"@ant-design/tools": "^13.6.0",
|
||||
"@ant-design/tools": "^13.6.2",
|
||||
"@docsearch/css": "^1.0.0-alpha.22",
|
||||
"@docsearch/react": "^3.0.0-alpha.37",
|
||||
"@qixian.cs/github-contributors-list": "^1.0.3",
|
||||
"@stackblitz/sdk": "^1.3.0",
|
||||
@ -192,6 +192,7 @@
|
||||
"cross-env": "^7.0.0",
|
||||
"dekko": "^0.2.1",
|
||||
"docsearch.js": "^2.6.3",
|
||||
"duplicate-package-checker-webpack-plugin": "^3.0.0",
|
||||
"enquire-js": "^0.2.1",
|
||||
"enzyme": "^3.10.0",
|
||||
"enzyme-to-json": "^3.6.0",
|
||||
|
@ -4,6 +4,7 @@ const getWebpackConfig = require('@ant-design/tools/lib/getWebpackConfig');
|
||||
const IgnoreEmitPlugin = require('ignore-emit-webpack-plugin');
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
const { ESBuildMinifyPlugin } = require('esbuild-loader');
|
||||
const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
|
||||
const darkVars = require('./scripts/dark-vars');
|
||||
const compactVars = require('./scripts/compact-vars');
|
||||
|
||||
@ -112,6 +113,13 @@ if (process.env.RUN_ENV === 'PRODUCTION') {
|
||||
reportFilename: '../report.html',
|
||||
}),
|
||||
);
|
||||
|
||||
config.plugins.push(
|
||||
new DuplicatePackageCheckerPlugin({
|
||||
verbose: true,
|
||||
emitError: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
processWebpackThemeConfig(webpackDarkConfig, 'dark', darkVars);
|
||||
|
Loading…
Reference in New Issue
Block a user