mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-08 18:39:20 +08:00
chore: use webpack to bundle umd (#54740)
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user