chore: use webpack to bundle umd (#54740)

This commit is contained in:
zoomdong
2025-08-22 17:40:12 +08:00
committed by GitHub
parent 6caa2564ac
commit 8f7a6f4058
2 changed files with 6 additions and 5 deletions

View File

@@ -5,14 +5,17 @@ const externalsConfig = {
react: {
root: 'React',
commonjs: 'react',
commonjs2: 'react',
},
dayjs: {
root: 'dayjs',
commonjs: 'dayjs',
commonjs2: 'dayjs',
},
'react-dom': {
root: 'ReactDOM',
commonjs: 'react-dom',
commonjs2: 'react-dom',
},
};
@@ -30,7 +33,6 @@ export default defineConfig({
name: 'antd',
sourcemap: true,
generateUnminified: true,
bundler: 'utoopack',
externals: externalsConfig,
output: {
path: './dist',
@@ -39,13 +41,11 @@ export default defineConfig({
alias: {
...resolveAliasConfig,
},
concatenateModules: true,
},
'./index-with-locales.js': {
name: 'antd',
sourcemap: true,
generateUnminified: true,
bundler: 'utoopack',
externals: externalsConfig,
output: {
path: './dist',
@@ -54,9 +54,10 @@ export default defineConfig({
alias: {
...resolveAliasConfig,
},
concatenateModules: true,
},
},
bundler: 'utoopack',
concatenateModules: true,
copy: [
{
from: './components/style/reset.css',

View File

@@ -55,7 +55,7 @@
"deploy": "gh-pages -d _site -b gh-pages -f",
"deploy:china-mirror": "git checkout gh-pages && git pull origin gh-pages && git push git@gitee.com:ant-design/ant-design.git gh-pages -f",
"predist": "npm run version && npm run token:statistic && npm run token:meta && npm run style",
"dist": "father build",
"dist": "antd-tools run dist",
"format": "biome format --write .",
"install-react-18": "npm i --no-save --legacy-peer-deps react@18 react-dom@18 @testing-library/react@16",
"bun-install-react-18": "bun remove react react-dom @testing-library/react && bun add --no-save react@18 react-dom@18 @testing-library/react@16",