Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not Import individual component #2110

Closed
1 task done
tuantmtb opened this issue Apr 17, 2020 · 2 comments
Closed
1 task done

Can not Import individual component #2110

tuantmtb opened this issue Apr 17, 2020 · 2 comments
Labels

Comments

@tuantmtb
Copy link

tuantmtb commented Apr 17, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.5.1

Environment

Vue: 2.6.11

Reproduction link

https://github.com/vueComponent/ant-design-vue

Steps to reproduce

In main.js

import Vue from 'vue'


import { default as ALayout } from 'ant-design-vue/lib/layout'
import '@/assets/lib/ant-design-vue/lib/layout/style'

import { default as ARow } from 'ant-design-vue/lib/row'
import '@/assets/lib/ant-design-vue/lib/row/style'

import { default as ACol } from 'ant-design-vue/lib/col'
import '@/assets/lib/ant-design-vue/lib/col/style'

import { default as AMenu } from 'ant-design-vue/lib/menu'
import '@/assets/lib/ant-design-vue/lib/menu/style'

import { default as AIcon } from 'ant-design-vue/lib/icon'
import '@/assets/lib/ant-design-vue/lib/icon/style'

import { default as AButton } from 'ant-design-vue/lib/button'
import '@/assets/lib/ant-design-vue/lib/button/style'

import { default as AForm } from 'ant-design-vue/lib/form'
import '@/assets/lib/ant-design-vue/lib/form/style'

import { default as ASelect } from 'ant-design-vue/lib/select'
import '@/assets/lib/ant-design-vue/lib/select/style'

import { default as AInput } from 'ant-design-vue/lib/input'
import '@/assets/lib/ant-design-vue/lib/input/style'

import { default as AInputNumber } from 'ant-design-vue/lib/input-number'
import '@/assets/lib/ant-design-vue/lib/input-number/style'

import { default as ACheckbox } from 'ant-design-vue/lib/checkbox'
import '@/assets/lib/ant-design-vue/lib/checkbox/style'

import { default as ARadio } from 'ant-design-vue/lib/radio'
import '@/assets/lib/ant-design-vue/lib/radio/style'

import { default as ATable } from 'ant-design-vue/lib/table'
import '@/assets/lib/ant-design-vue/lib/table/style'

import { default as APopover } from 'ant-design-vue/lib/popover'
import '@/assets/lib/ant-design-vue/lib/popover/style'

import { default as ATooltip } from 'ant-design-vue/lib/tooltip'
import '@/assets/lib/ant-design-vue/lib/tooltip/style'

import { default as ARate } from 'ant-design-vue/lib/rate'
import '@/assets/lib/ant-design-vue/lib/rate/style'

import { default as ASpin } from 'ant-design-vue/lib/spin'
import '@/assets/lib/ant-design-vue/lib/spin/style'

import { default as ADivider } from 'ant-design-vue/lib/divider'
import '@/assets/lib/ant-design-vue/lib/divider/style'

Vue.use(ALayout)
Vue.use(ARow)
Vue.use(ACol)
Vue.use(AButton)
Vue.use(AMenu)
Vue.use(AIcon)
Vue.use(AForm)
Vue.use(ASelect)
Vue.use(AInput)
Vue.use(AInputNumber)
Vue.use(ACheckbox)
Vue.use(ARadio)
Vue.use(ATable)
Vue.use(APopover)
Vue.use(ATooltip)
Vue.use(ARate)
Vue.use(ADivider)
Vue.use(ASpin)

RUN vue-cli-service build --report

What is expected?

How can I remove moment.js, lodash and select individual icons?

What is actually happening?

The bundle still import moment.js; lodash; (too large size) (see screen shot)

Screen Shot 2020-04-17 at 1 00 40 PM

How can I remove moment.js, lodash and select individual icons?

@tuantmtb
Copy link
Author

I fixed!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant