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: use require for polyfills and helpers #6778

Merged
merged 10 commits into from
Jan 16, 2023
Merged

Conversation

RiESAEX
Copy link
Contributor

@RiESAEX RiESAEX commented Jan 10, 2023

Description:

use require for polyfills and helpers
typeof isModule changed to Option.to allow test case set there isModule with swcrc.
#6760
BREAKING CHANGE:

Related issue (if exists):
close #6727

@kdy1 kdy1 self-assigned this Jan 11, 2023
@kdy1 kdy1 added this to the Planned milestone Jan 11, 2023
crates/swc_bundler/src/bundler/finalize.rs Outdated Show resolved Hide resolved
@@ -1,2 +1,2 @@
var foo = function o() {};
var foo = function foo() {};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure about this change..
I think this is caused by the type change of isModule.

@RiESAEX RiESAEX requested review from kdy1 and removed request for kdy1 January 13, 2023 03:23
@RiESAEX
Copy link
Contributor Author

RiESAEX commented Jan 13, 2023

Wasm build failed, but I don't know how to fix it. It works fine on my computer.

@@ -92,6 +91,52 @@ macro_rules! add_import_to {
}};
}

macro_rules! add_require_to {
Copy link
Member

Choose a reason for hiding this comment

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

Please change this to a function.
It will fix Wasm issue

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thanks!

crates/swc_ecma_transforms_base/src/helpers/mod.rs Outdated Show resolved Hide resolved
RiESAEX and others added 2 commits January 16, 2023 10:58
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thanks!


swc-bump:

  • swc_ecma_transforms_base --breaking

@kdy1 kdy1 enabled auto-merge (squash) January 16, 2023 03:08
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@kdy1 kdy1 disabled auto-merge January 16, 2023 05:34
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

CI failed

@kdy1 kdy1 enabled auto-merge (squash) January 16, 2023 15:25
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@kdy1 kdy1 merged commit ad8d043 into swc-project:main Jan 16, 2023
@kdy1 kdy1 modified the milestones: Planned, v1.3.27 Jan 17, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

automatic polyfill for scripts
3 participants