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

chore: enable sourcemaps for radix-vue package #469

Closed
wants to merge 1 commit into from

Conversation

romansp
Copy link
Contributor

@romansp romansp commented Oct 26, 2023

Enable sourcemaps for radix-vue so it's easier to understand and debug possible usage issues in development.

After running locally pnpm --filter radix-vue build I see that *.js.map files are generated in dist. I don't have much experience with publishing to npm but I guess these files should be picked up automatically on publish.

@zernonia
Copy link
Member

After adding source map.. the total dist size increased to 3.02MB (previously 1.12MB). Not sure if we wanna include that into the package tho 🙈

@romansp
Copy link
Contributor Author

romansp commented Oct 26, 2023

Yeah that's really unfortunate and understand your concern. Though these maps won't be included in the production build of the app. At least not by default.

I'm looking at the generated sourcemap file and it seems to inlcudes sourcemap for several external packages too, e.g. vueuse, defu, aria-hidden. Unfortunately I'm not highly familiar with the process of generating source maps for libraries. Maybe that's expected behavior or maps for external packages could be omitted somehow?

Would appreciate if anyone could help with figuring this out.

@zernonia
Copy link
Member

Thanks for pointing that out.. didn't realized it consist of source map for external packages.
I have no idea how to exclude those too 😂

@sadeghbarati
Copy link
Collaborator

sadeghbarati commented Oct 28, 2023

Probably one way is to keep radix-vue package and also publish individual packages just like radix-ui

  • radix-vue without sourcemap for those who don't care about sourcemap

  • radix-vue/accordion, radix-vue/alert-dialog, .... with sourcemap

@zernonia
Copy link
Member

Closing this in favor of #1432 😁

@zernonia zernonia closed this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants