Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add better ESM support#6939

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
kyletsang wants to merge1 commit intomaster
base:master
Choose a base branch
Loading
fromimport-extensions
Draft

Conversation

kyletsang
Copy link
Member

This pull request introduces several changes to modernize the codebase and improve compatibility with ES modules. The most significant updates include switching from CommonJS to ES module syntax, adding the"type": "module" field inpackage.json, and updating dependencies. Additionally, import paths across multiple files have been updated to explicitly include.js extensions for better module resolution.

Modernization of module system:

  • .babelrc.js: Replacedmodule.exports withexport default to align with ES module syntax.
  • package.json: Added"type": "module" to indicate the use of ES modules.
  • package.json: Removed the creation ofpackage.json files with"type" fields during build scripts, as the"type": "module" field now applies globally.

Dependency updates:

  • package.json: Updated@restart/ui to version^2.0.0-beta.5 anddom-helpers to version^6.0.1 for improved functionality and compatibility.

Import path updates:

  • Updated all import paths across multiple files (e.g.,src/AbstractModalHeader.tsx,src/Accordion.tsx,src/Alert.tsx, etc.) to include.js extensions explicitly, ensuring compatibility with ES modules. Examples include:
    • src/AbstractModalHeader.tsx: Changed imports forCloseButton andModalContext to include.js extensions.
    • src/Accordion.tsx: Updated imports forAccordionBody,AccordionButton,AccordionCollapse, and others to include.js extensions.
    • src/Alert.tsx: Updated imports forAlertHeading,AlertLink,Fade, and others to include.js extensions.

nwalters512 and reteps reacted with heart emoji
@kyletsang
Copy link
MemberAuthor

Needsreact-restart/ui#126 to be merged and released before this can be merged

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@kyletsang

[8]ページ先頭

©2009-2025 Movatter.jp