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

fix(build): add module condition in package exports #10036

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Conversation

yyx990803
Copy link
Member

/cc @danielroe #9977 has caused a number of regressions with different causes: #10012, #10020, also got another private report from @lehni in his project.

It seems I merged it to soon and it was indeed risky in a patch. For now I have reverted the exports conditions in 7bd4e90 to avoid other unknown regressions.

This PR fixes #10012, but I need further confirmation for the other two cases. @Mister-Hope / @lehni would appreciate if you can try this commit in your project to see if it fixes your issue.

I am also not sure if the addition of module would intefere with the bundle size gain in Nitro / Nuxt.

@lehni
Copy link
Contributor

lehni commented Jan 8, 2024

@yyx990803 apologies for not creating the issue for this yet, it's still on my TODO list. Do you still need the issue now? I will test ASAP and report back in a bit.

@lehni
Copy link
Contributor

lehni commented Jan 9, 2024

@yyx990803 I finally found time to do the test, and I can confirm that this works in my case!

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 89.7 kB 34.2 kB 30.8 kB
vue.global.prod.js 147 kB 53.4 kB 47.7 kB

Usages

Name Size Gzip Brotli
createApp 50.1 kB 19.6 kB 17.9 kB
createSSRApp 53.4 kB 20.9 kB 19.1 kB
defineCustomElement 52.4 kB 20.4 kB 18.6 kB
overall 63.8 kB 24.7 kB 22.4 kB

@yyx990803
Copy link
Member Author

/ecosystem-ci run

@vue-bot
Copy link
Contributor

vue-bot commented Jan 11, 2024

📝 Ran ecosystem CI: Open

suite result latest scheduled
language-tools failure failure
nuxt success success
pinia success success
quasar success success
router success success
test-utils success success
vant success success
vite-plugin-vue success success
vitepress success success
vue-i18n success success
vue-macros success success
vuetify success success
vueuse success success
vue-simple-compiler success success

@yyx990803 yyx990803 merged commit 92514db into main Jan 11, 2024
15 checks passed
@yyx990803 yyx990803 deleted the fix-exports branch January 11, 2024 10:04
@lehni
Copy link
Contributor

lehni commented Jan 13, 2024

Just to confirm: This works in the new release. Thanks @yyx990803 !

@Mister-Hope
Copy link

Mister-Hope commented Jan 13, 2024

Sorry for delay, the fix does not work for me @yyx990803

I am postgraduate student and busy with my thesis these days.

See https://github.com/vuepress-theme-hope/vuepress-theme-hope/actions/runs/7513512110/job/20455377640#step:7:177

The commit bump vue from 3.4.8 to 3.4.13, with nothing else. I am still meeting:

"Module not found: Error: Can't resolve 'velocityjs' in '/home/runner/work/vuepress-theme-hope/vuepress-theme-hope/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist'",
Module not found: Error: Can't resolve 'dustjs-linkedin' in '/home/runner/work/vuepress-theme-hope/vuepress-theme-hope/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist'

@Threebow
Copy link

Threebow commented Jan 28, 2024

Having same issue as above (#10020 where it cannot resolve velocityjs). I don't use velocityjs in any of my code. I am on the latest version of vue/compiler-sfc. Not sure if I should make another issue, as #10020 is closed however seems to be not yet fixed as noted above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrading to 3.4 breaks ref behaviour in highcharts-vue
5 participants