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(es/transform): support for importing namespaces from const_modules #7013

Merged
merged 3 commits into from
Mar 6, 2023

Conversation

magic-akari
Copy link
Member

Description:

BREAKING CHANGE:

Related issue (if exists):

@magic-akari
Copy link
Member Author

The current approach to defining const_modules involves using the Record<ident, expression> format, as exemplified below:

{
  "globals": {
    "module_foo": {
      "DEBUG": "true"
    }
  }
}

I feel that this method to defining const_modules is a bit cumbersome. Instead, I prefer to use the Record<ident, value> format, as shown below:

{
  "globals": {
    "module_foo": {
      "DEBUG": true
    }
  }
}

What is your opinion?

Perhaps I am looking for something like const_json_modules.

@magic-akari magic-akari marked this pull request as ready for review March 4, 2023 16:54
@kdy1
Copy link
Member

kdy1 commented Mar 5, 2023

I agree with your opinion.

@kdy1
Copy link
Member

kdy1 commented Mar 5, 2023

Storing an expression in a json file is quite cumbersome

@kdy1 kdy1 added this to the Planned milestone Mar 5, 2023
@kdy1 kdy1 self-assigned this Mar 5, 2023
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_optimization

@kdy1 kdy1 enabled auto-merge (squash) March 6, 2023 01:14
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 3cb03d5 into swc-project:main Mar 6, 2023
@kdy1 kdy1 modified the milestones: Planned, v1.3.38 Mar 6, 2023
@magic-akari magic-akari deleted the feat/es/transform branch March 10, 2023 02:51
@swc-project swc-project locked as resolved and limited conversation to collaborators Apr 9, 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.

3 participants