-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Use ESM JSON imports instead of adhoc json imports #34176
Conversation
Size Change: 0 B Total Size: 1.04 MB ℹ️ View Unchanged
|
I will have a look at the issue you mentioned. https://github.com/tc39/proposal-import-assertions - noting that this feature it's still stage 3, so it isn't a JavaScript standard. Unless, it was promoted to stage 4 and the repository didn't get a refresh. |
595912d
to
4057c22
Compare
I fixed the lock file in 4057c22 and linter runs again. It shows an error though: |
We would be able to remove the Babel plugin that inlines JSON files: Line 6 in 914f543
Line 5 in 914f543
According to my testing, we will have to copy JSON files to There is also this question what would happen to: gutenberg/bin/packages/build.js Lines 148 to 156 in 914f543
|
I'm happy to see it happen, but I think we should wait until the spec is standardized or until the tooling catch up. 👍 |
Closing this PR JSON imports are still stage 3, it's taking so much time :( |
Related to #36142 and #36716.
For some time now, we've been using a custom JSON import to load block metadata in JS. Now that JSON modules are being standardized, we should switch to the standard syntax which would allow us to avoid lockin.
This seems to work well aside eslint. I was not able to make eslint work without issues here. Any help would be appreciated.