-
Notifications
You must be signed in to change notification settings - Fork 21
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
Bundle size Vue3 30MB webpack-cli 4.9.1 vue-cli 5.0.1 - unsure how to fix #24
Comments
@Maximus1000 having the same issue here, did you manage to solve it? |
same issue. bump |
This only seems to happen in Dev Server. |
Happens in prod for us as well
…On Wed, Jan 3, 2024, 10:11 Dino Kupinic ***@***.***> wrote:
This only seems to happen in Dev Server.
In production this issue doesnt occur
—
Reply to this email directly, view it on GitHub
<#24 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJLJSLBDGMUIVOSL6WCCCTYMV7JZAVCNFSM52NEJMFKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBXGU3DCNJXGEZQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hmm... I used |
@Dino-Kupinic We are on webpack, weird it happens on both |
webpack same issue. bump |
Incredibly useful package. Thanks so much for your work on this. I have the same issue as a few others in terms of bundle size. I'm not using Vite, and simply can't figure out how to get tree-shaking / exclude to work in a standard Vue3 / vue-cli setup. In my larger project using webpack-cli 4.9.1 nad vue-cli 5.0.1, I started noticing slow load times and confirmed that it's on account of a 30mb icon file. I then created a fresh project as listed below to confirm that tree-shaking is no longer working in current default vue3 builds via vue-cli.
In a fresh project built with vue-cli and nothing else in it, when I import like the following, I get a 31MB js file.
However, if I import like this, I get a 789kb vendors file.
//main.js or any component
I'm not sure what if any options Vue3 allows for exclude like the other poster described and solved using Vite. I do appreciate your work on this package, saves a lot of time on my end, and it's quite something to be able to instantly search 30k+ icons at once.
For now, in my larger projects, I'll simply dive down into the child dir of the relevant icon set. Also, this issue presented itself to me in the past week or less, unsure exactly; so, this may be related to some change in how Vue3 and/or Webpack is building.
Also, baseline chunk_vendors size with only the following devDep is 514kb. In this test, I'm not importing oh-vue-icons in main.js. Meaning that the single icon import of AiSemanticScholarSquare above is costing about 280kb, which likely means to me that vue is importing all content in the /ai folder, e.g. tree-shaking is not working when a single icon is being imported.
Thanks in advance for your efforts.
-Marcus
The text was updated successfully, but these errors were encountered: