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: exports field detection #2

Merged
merged 3 commits into from
Oct 21, 2021
Merged

fix: exports field detection #2

merged 3 commits into from
Oct 21, 2021

Conversation

sibbng
Copy link
Contributor

@sibbng sibbng commented Oct 21, 2021

Based on: webpack/enhanced-resolve#313 (comment)

Should we include "node", "browser", "default"?

This change works with rollup but not esbuild. On Windows it doesn't work at all.

@sibbng sibbng changed the title fix: export field detection fix: exports field detection Oct 21, 2021
@sibbng
Copy link
Contributor Author

sibbng commented Oct 21, 2021

After this changes export-size cli works but vueuse's export size script failing with different error.

> @vueuse/monorepo@6.7.3 size C:\Users\sib\fork\vueuse
>  esno scripts/export-size.ts

(node:19172) UnhandledPromiseRejectionWarning: Error: Can't resolve '@vueuse/shared' in 'C:\Users\sib\fork\vueuse\packages\core\dist'
    at finishWithoutResolve (C:\Users\sib\dev\sli\export-size\node_modules\.pnpm\enhanced-resolve@5.8.3\node_modules\enhanced-resolve\lib\Resolver.js:293:18)

@sibbng
Copy link
Contributor Author

sibbng commented Oct 21, 2021

I got it working after making some updates on vueuse's scripts. But it required me to remove these three lines from this package. Because they were wrongly modifying the path. I didn't see any side effects during build. @antfu I hope you can tell me what this lines do 👀

My changes on vueuse: sibbng/vueuse@6ff7149

@antfu antfu merged commit eadf635 into antfu:main Oct 21, 2021
@sibbng
Copy link
Contributor Author

sibbng commented Oct 21, 2021

Esbuild works fine on my Windows machine but on Gitpod it throws RangeError: Maximum call stack size exceeded.

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.

None yet

2 participants