Skip to content

Commit

Permalink
✨ feat: 跑通动态加载方案
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 21, 2023
1 parent 8b33be6 commit 6e5a08e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .fatherrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ import { defineConfig } from 'father';
export default defineConfig({
umd: {
output: { path: 'dist', filename: 'index' },
externals: ['react', 'react-dom', 'antd', 'antd-style', 'i18next', 'react-i18next'],
externals: {
'react': 'React',
'react-dom': 'ReactDOM',
'antd': 'antd',
'antd-style': 'antd-style',
},

chainWebpack: (memo) => {
// use https://github.com/systemjs/systemjs to dynamic load
memo.output.libraryTarget('system');
return memo;
},
},
});

0 comments on commit 6e5a08e

Please sign in to comment.