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

feat: add modules option toggle #2738

Merged
merged 3 commits into from
Mar 1, 2023

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Feb 28, 2023

Added modules option toggle to REPL, also updated REPL docs links.

Preview link: https://deploy-preview-2738--babel.netlify.app/repl

@JLHwung JLHwung added the repl label Feb 28, 2023
@netlify
Copy link

netlify bot commented Feb 28, 2023

Deploy Preview for babel ready!

Name Link
🔨 Latest commit 1644462
🔍 Latest deploy log https://app.netlify.com/sites/babel/deploys/63ff7ebca8725b00089cf22e
😎 Deploy Preview https://deploy-preview-2738--babel.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

onChange={this._onEnvPresetSettingChange("modules")}
disabled={!envConfig.isEnvPresetEnabled}
>
<option value="auto">auto</option>
Copy link
Member

Choose a reason for hiding this comment

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

I think we shouldn't support "auto" in the REPL, since in this specific case it's just a synonymous for "commonjs" and there is now way just using the REPL to see how "auto" actually behaves.

And maybe we could default to ESM?

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo Mar 1, 2023

Choose a reason for hiding this comment

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

As a follow up, I'd like to make ESM imports of URLs work in the REPL, so that people can load external deps.

Copy link
Member

Choose a reason for hiding this comment

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

As a follow up, I'd like to make ESM imports of URLs work in the REPL, so that people can load external deps.

Do you mean allow the import to execute?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, when you enable evaluate in the sidebar.

Copy link
Member

Choose a reason for hiding this comment

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

Something like this: bloomberg/record-tuple-polyfill#30

Copy link
Member

Choose a reason for hiding this comment

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

Looks great, I tried doing this with rollup, but only partially.

@JLHwung JLHwung merged commit 7f05a0c into babel:main Mar 1, 2023
@JLHwung JLHwung deleted the add-modules-option-to-repl branch March 1, 2023 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants