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

Don't minify extension source code. #457

Open
MicahZoltu opened this issue Feb 5, 2023 · 2 comments
Open

Don't minify extension source code. #457

MicahZoltu opened this issue Feb 5, 2023 · 2 comments

Comments

@MicahZoltu
Copy link
Contributor

Unlike web pages served over the internet, extensions don't suffer nearly as much from large file sizes since you download the extension once at install time and then never again (aside from occasional automatic background updates). The minification process that the code goes through significantly impacts the ability to debug the extension and the code it injects into the page.

Recommend not minfying the extension and instead shipping it as a largely unbundeld/unminified codebase so that debugging is maximally easy. My guess is that this would increase the extension download size from epsilon to inconsequential, which feels like an acceptable trade off for making it easier for your users to track down bugs in the extension rather than having to create a repro case and then forward it on to you.

@marvinhagemeister
Copy link
Member

I'm not sure by that as the extension code isn't minified. It's merely bundled as it's way easier to inject a single file into the page context.

@MicahZoltu
Copy link
Contributor Author

I don't know why I previously thought this was minified, this GitHub issue did a very poor job of showing the problem as even I can't figure out what I meant now. 😖

That being said, I can see that source maps aren't included, so perhaps we can just convert this issue to "Include source maps".

sourcemap: false,

This would make it so debugging is a bit easier as it would be in the language originally written (TS) rather than the transpilation target (JS).

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

No branches or pull requests

2 participants