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: {
|
react: {
|
||||||
root: 'React',
|
root: 'React',
|
||||||
commonjs: 'react',
|
commonjs: 'react',
|
||||||
|
commonjs2: 'react',
|
||||||
},
|
},
|
||||||
dayjs: {
|
dayjs: {
|
||||||
root: 'dayjs',
|
root: 'dayjs',
|
||||||
commonjs: 'dayjs',
|
commonjs: 'dayjs',
|
||||||
|
commonjs2: 'dayjs',
|
||||||
},
|
},
|
||||||
'react-dom': {
|
'react-dom': {
|
||||||
root: 'ReactDOM',
|
root: 'ReactDOM',
|
||||||
commonjs: 'react-dom',
|
commonjs: 'react-dom',
|
||||||
|
commonjs2: 'react-dom',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -30,7 +33,6 @@ export default defineConfig({
|
|||||||
name: 'antd',
|
name: 'antd',
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
generateUnminified: true,
|
generateUnminified: true,
|
||||||
bundler: 'utoopack',
|
|
||||||
externals: externalsConfig,
|
externals: externalsConfig,
|
||||||
output: {
|
output: {
|
||||||
path: './dist',
|
path: './dist',
|
||||||
@@ -39,13 +41,11 @@ export default defineConfig({
|
|||||||
alias: {
|
alias: {
|
||||||
...resolveAliasConfig,
|
...resolveAliasConfig,
|
||||||
},
|
},
|
||||||
concatenateModules: true,
|
|
||||||
},
|
},
|
||||||
'./index-with-locales.js': {
|
'./index-with-locales.js': {
|
||||||
name: 'antd',
|
name: 'antd',
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
generateUnminified: true,
|
generateUnminified: true,
|
||||||
bundler: 'utoopack',
|
|
||||||
externals: externalsConfig,
|
externals: externalsConfig,
|
||||||
output: {
|
output: {
|
||||||
path: './dist',
|
path: './dist',
|
||||||
@@ -54,9 +54,10 @@ export default defineConfig({
|
|||||||
alias: {
|
alias: {
|
||||||
...resolveAliasConfig,
|
...resolveAliasConfig,
|
||||||
},
|
},
|
||||||
concatenateModules: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
bundler: 'utoopack',
|
||||||
|
concatenateModules: true,
|
||||||
copy: [
|
copy: [
|
||||||
{
|
{
|
||||||
from: './components/style/reset.css',
|
from: './components/style/reset.css',
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
"deploy": "gh-pages -d _site -b gh-pages -f",
|
"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",
|
"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",
|
"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 .",
|
"format": "biome format --write .",
|
||||||
"install-react-18": "npm i --no-save --legacy-peer-deps react@18 react-dom@18 @testing-library/react@16",
|
"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",
|
"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