Skip to content

fix(transform-imports): Transform side-effect imports#473

Merged
kdy1 merged 5 commits into
swc-project:mainfrom
jsbravoc:main
Jun 13, 2025
Merged

fix(transform-imports): Transform side-effect imports#473
kdy1 merged 5 commits into
swc-project:mainfrom
jsbravoc:main

Conversation

@jsbravoc

@jsbravoc jsbravoc commented Jun 13, 2025

Copy link
Copy Markdown
Contributor

Closes: #474


Original issue: Imports with side effects were being incorrectly removed. The expected behavior is to retain the import and apply the transformation.

The current behavior causes issues when the code includes TypeScript side-effect imports. These are skipped by the plugin and remain untransformed, which leads to runtime failures in Node.js (since it cannot import .ts files directly).

@changeset-bot

changeset-bot Bot commented Jun 13, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ca5dea6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant

CLAassistant commented Jun 13, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@kdy1
kdy1 enabled auto-merge (squash) June 13, 2025 15:14
@kdy1
kdy1 merged commit 60dfc2c into swc-project:main Jun 13, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

transform-imports: side-effect imports are not being transformed

3 participants