@mxmweb/zui 1.0.19 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/vite.config.ts +13 -0
package/dist/package.json
CHANGED
package/package.json
CHANGED
package/vite.config.ts
CHANGED
|
@@ -108,6 +108,19 @@ export default ({ mode }: { mode: string }) => {
|
|
|
108
108
|
},
|
|
109
109
|
rollupOptions: {
|
|
110
110
|
external: (id) => {
|
|
111
|
+
// 在开发环境中,不外部化 @mxmweb 包,让它们能够正确解析
|
|
112
|
+
if (mode === 'development') {
|
|
113
|
+
return [
|
|
114
|
+
'react',
|
|
115
|
+
'react-dom',
|
|
116
|
+
'styled-components',
|
|
117
|
+
'animejs',
|
|
118
|
+
'antd',
|
|
119
|
+
'lucide-react',
|
|
120
|
+
].some(pkg => id === pkg || id.startsWith(`${pkg}/`));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// 在生产构建中,外部化所有 @mxmweb 包
|
|
111
124
|
return [
|
|
112
125
|
'react',
|
|
113
126
|
'react-dom',
|