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

Un-minified bundled js #6104

Open
mmkal opened this issue Jan 6, 2022 · 6 comments · May be fixed by #6143
Open

Un-minified bundled js #6104

mmkal opened this issue Jan 6, 2022 · 6 comments · May be fixed by #6143
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@mmkal
Copy link
Contributor

mmkal commented Jan 6, 2022

Is your feature request related to a problem? Please describe.

Often I find myself looking at call stacks like this:

image

And it's usually because I've done something stupid, but netlify-cms is not being very helpful in my attempt to figure out what I did.

Describe the solution you'd like

Two .js outputs in the dist folder of the netlify-cms package (ideally, also the various other packages like netlify-cms-app etc. but netlify-cms would be a good start). Similar to js-yaml:

image

Then the docs could be updated to refer to index.min.js instead of index.js. Or, to avoid accidentally expanding bundle sizes, they could be named index.js and index.unminified.js.

@mmkal mmkal added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jan 6, 2022
@erezrokah
Copy link
Contributor

Hi @mmkal, we publish the source maps so that should be good enough?

See https://unpkg.com/netlify-cms@2.10.183/dist/netlify-cms.js.map

@mmkal
Copy link
Contributor Author

mmkal commented Jan 9, 2022

@erezrokah interesting, maybe I have chrome misconfigured. I'll look into making it load the source maps.

Although, even with source maps, it still can't be as convenient, or as well supported by all tools (chrome dev tools, Firefox dev tools, vscode, plaintext editors, vim via ssh on some server somewhere). I don't really see the downside to publishing both versions. Most libraries do it 🙃

@erezrokah
Copy link
Contributor

Yes, I agree. Would you like to submit a PR for it?
I'd say use index.unminified.js for it not to be a breaking change

mmkal added a commit to mmkal/decap-cms that referenced this issue Jan 21, 2022
mmkal added a commit to mmkal/decap-cms that referenced this issue Jan 21, 2022
@mmkal
Copy link
Contributor Author

mmkal commented Jan 21, 2022

@erezrokah see the commit above for a first pass. Does that look like it's roughly right?

@erezrokah
Copy link
Contributor

Won't mmkal@45663be#diff-a393479db8dc8b6868eef8f5fa99c576654d75fb00336dc82c2be71789c6d4dfR86

create <package-name>.bundle.js and <package-name>.bundle.unminified.js?
I can't be sure without running it locally, though I think we'd prefer to not change the current minified name

@mmkal
Copy link
Contributor Author

mmkal commented Jan 21, 2022

Yes you are right, just an oversight on my part. I'll fix and open a draft PR, it'll be easier to talk there.

@mmkal mmkal linked a pull request Jan 21, 2022 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants