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 LWS flag & import babel plugins #3357

Merged
merged 23 commits into from
Jun 1, 2023

Conversation

a-chabot
Copy link
Contributor

Details

feat: add LWS flag & import babel plugins

Does this pull request introduce a breaking change?

  • ✅ No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • ✅ No, it does not introduce an observable change.

GUS work item

@W-12560396 -- Enable LWS babel transform integration in OSS LWC compiler

Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Copy link
Contributor

@arcadeteddy arcadeteddy left a comment

Choose a reason for hiding this comment

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

LGTM! Awesome!

if (lws) {
plugins.push(
'@locker/babel-plugin-transform-unforgeables',
'@babel/plugin-transform-async-to-generator',
Copy link
Contributor

Choose a reason for hiding this comment

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

☝️ For async-await support

plugins.push(
'@locker/babel-plugin-transform-unforgeables',
'@babel/plugin-transform-async-to-generator',
'@babel/plugin-proposal-async-generator-functions'
Copy link
Contributor

@jdalton jdalton Feb 21, 2023

Choose a reason for hiding this comment

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

☝️ For for await...of support
(despite the plugin name of "proposal" this feature is stage 4 and no longer a proposal)

Copy link
Contributor

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

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

Can you add a sniff test to confirm that the lws option works? Otherwise LGTM

@nolanlawson nolanlawson mentioned this pull request Feb 21, 2023
Copy link
Contributor

@ravijayaramappa ravijayaramappa left a comment

Choose a reason for hiding this comment

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

+1 for adding tests.

packages/@lwc/rollup-plugin/src/index.ts Outdated Show resolved Hide resolved
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Copy link
Contributor

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

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

I have some questions about this, will resolve internally

Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
Copy link
Contributor

@ravijayaramappa ravijayaramappa left a comment

Choose a reason for hiding this comment

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

A deleted option has snuck in probably because of a rebase.

packages/@lwc/compiler/src/options.ts Outdated Show resolved Hide resolved
packages/@lwc/compiler/src/options.ts Outdated Show resolved Hide resolved
@a-chabot a-chabot requested a review from a team as a code owner May 24, 2023 15:17
Copy link
Contributor

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

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

This LGTM after a few nitpicks, but I'd also like a +1 from @ravijayaramappa

Signed-off-by: Alex Chabot <a.chabot@salesforce.com>
@nolanlawson nolanlawson merged commit c3aa8e6 into salesforce:master Jun 1, 2023
12 checks passed
@a-chabot a-chabot deleted the a-chabot/lws-flag-babel branch August 10, 2023 15:04
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

5 participants