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

Rename main.js to main.cjs #26

Merged
merged 1 commit into from
Apr 16, 2022
Merged

Conversation

Nick-Mazuk
Copy link
Contributor

When a user's root-level package.json includes "type": "module", building with rules_swc produces the following error:

require('@swc/cli')
^

ReferenceError: require is not defined in ES module scope, you can use import instead

Renaming the main.js file to main.cjs resolves this issue.

See minimal reproduction of the issue: https://github.com/Nick-Mazuk/bazel-swc-es6

@CLAassistant
Copy link

CLAassistant commented Apr 16, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

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

Thanks!

@alexeagle alexeagle merged commit 988935a into aspect-build:main Apr 16, 2022
@Nick-Mazuk Nick-Mazuk deleted the patch-1 branch April 16, 2022 20:04
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.

3 participants