chore: add axios to used for shared dependency

pull/81/head
moonrailgun 3 years ago
parent fc0ec67568
commit bdeae2fa09

File diff suppressed because it is too large Load Diff

@ -3,7 +3,10 @@ const replace = require('rollup-plugin-replace');
const path = require('path');
module.exports = {
externalDeps: ['react'],
externalDeps: [
'react',
'axios', // Use for some deps which will use axios and reduce bundle size
],
rollupPlugins: ({ pluginName }) => [
copy({
targets: [

@ -25,6 +25,7 @@
"@iconify/react": "^3.0.0-alpha.1",
"@loadable/component": "^5.15.0",
"antd": "^4.18.2",
"axios": "^0.21.1",
"clsx": "^1.1.1",
"emoji-mart": "^3.0.1",
"is-hotkey": "^0.2.0",

@ -13,6 +13,7 @@ export function initPlugins(): Promise<void> {
function registerDependencies() {
regDependency('react', () => import('react'));
regDependency('axios', () => import('axios')); // 用于插件的第三方包使用axios作为依赖的情况下可以减少包体积
}
function registerModules() {

Loading…
Cancel
Save