Skip to content

Conversation

@lnbc1QWFyb24
Copy link
Contributor

Description

ES modules need to have the file extension included for relative imports to work natively in the browser. TypeScript does not add the file extensions at compile time, but will recognize a .js import as referring to the compiled JavaScript. This PR adds a .js extension to all relative imports in the codebase.
This will fix issues in Vite projects and others that stick to the ES module spec.

Fixes #1226

Checklist

  • The version field in package.json is incremented following semantic versioning
  • The box that allows repo maintainers to update this PR is checked
  • I tested locally to make sure this feature/fix works
  • I have run yarn type-check & yarn build to confirm there are not any associated errors

Copy link
Contributor

@Adamj1232 Adamj1232 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dang that's a lot of changes, thanks for doing that!

@wraeth-eth
Copy link

Damn, this is wild! Thanks a lot for this one @aaronbarnardsound !

@lnbc1QWFyb24 lnbc1QWFyb24 merged commit 748f7d8 into v2-web3-onboard-develop Aug 22, 2022
@lnbc1QWFyb24 lnbc1QWFyb24 deleted the fix/imports branch August 22, 2022 22:55
This was referenced Aug 24, 2022
tomquirk pushed a commit to jbx-protocol/juice-interface that referenced this pull request Aug 30, 2022
## What does this PR do and why?

Updates to the latest web3-onboard now that the es module bug is fixed (thirdweb-dev/web3-onboard#1227).

Closes #1784

## Screenshots or screen recordings

_If applicable, provide screenshots or screen recordings to demonstrate the changes._

## Acceptance checklist

- [ ] I have evaluated the [Approval Guidelines](https://github.com/jbx-protocol/juice-interface/blob/main/CONTRIBUTING.md#approval-guidelines) for this PR.
- [ ] I have tested this PR in [all supported browsers](https://github.com/jbx-protocol/juice-interface/blob/main/CONTRIBUTING.md#supported-browsers).
- [ ] I have tested this PR in dark mode and light mode (if applicable).
tomquirk pushed a commit to jbx-protocol/juice-interface that referenced this pull request Feb 11, 2023
## What does this PR do and why?

Updates to the latest web3-onboard now that the es module bug is fixed (thirdweb-dev/web3-onboard#1227).

Closes #1784

## Screenshots or screen recordings

_If applicable, provide screenshots or screen recordings to demonstrate the changes._

## Acceptance checklist

- [ ] I have evaluated the [Approval Guidelines](https://github.com/jbx-protocol/juice-interface/blob/main/CONTRIBUTING.md#approval-guidelines) for this PR.
- [ ] I have tested this PR in [all supported browsers](https://github.com/jbx-protocol/juice-interface/blob/main/CONTRIBUTING.md#supported-browsers).
- [ ] I have tested this PR in dark mode and light mode (if applicable).
tomquirk pushed a commit to jbx-protocol/juice-interface that referenced this pull request Feb 11, 2023
## What does this PR do and why?

Updates to the latest web3-onboard now that the es module bug is fixed (thirdweb-dev/web3-onboard#1227).

Closes #1784

## Screenshots or screen recordings

_If applicable, provide screenshots or screen recordings to demonstrate the changes._

## Acceptance checklist

- [ ] I have evaluated the [Approval Guidelines](https://github.com/jbx-protocol/juice-interface/blob/main/CONTRIBUTING.md#approval-guidelines) for this PR.
- [ ] I have tested this PR in [all supported browsers](https://github.com/jbx-protocol/juice-interface/blob/main/CONTRIBUTING.md#supported-browsers).
- [ ] I have tested this PR in dark mode and light mode (if applicable).
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

Successfully merging this pull request may close these issues.

[Bug]: Build failure due to [ERR_UNSUPPORTED_DIR_IMPORT] error

4 participants