Modernize import syntax to ESModules#665
Merged
EzraBrooks merged 5 commits intodevelopfrom Feb 20, 2024
Merged
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This was referenced Jan 23, 2024
a7a5bb1 to
6a8c988
Compare
448079a to
6c53d44
Compare
Contributor
Author
|
Sorry for the delay here, it's actually a good sign, because this branch has been working in such a bulletproof manner on my project that I've been forgetting to come back and finish this.. |
086e1e8 to
8f01f52
Compare
8f01f52 to
ef40260
Compare
Contributor
Author
|
See #687 for why we're doing this! The existing library layout didn't work with Rollup and Vite, but after this PR it does! |
MatthijsBurgh
approved these changes
Feb 20, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Public API Changes
This is definitely a breaking change. Code requiring CommonJS modules may no longer work the same way or at all.
Description
This removes usage of the old CommonJS module
requiresyntax in favor of ECMAScript Moduleimportsyntax, to ease the adoption of a newer bundler like Rollup. This code works in my Vite-based codebase, so it should work in Rollup.The bulk of this PR is a change to
package-lock.jsonfrom shuffling dependencies around.Related to desire for a better/newer bundler in #647.