Skip to content

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

Description

@jsbravoc

Describe the bug
Side effect imports are not being transformed. The plugin currently ignores these imports when they should be transformed. See original issue #329, the expected output is to have both imports transformed.

URL to minimal reproduction
The tests assert this behavior: https://github.com/swc-project/plugins/tree/main/packages/transform-imports/transform/tests/fixture/side-effect-imports

Expected behavior
Side-effect imports should be transformed

  • Input
import './upload/upload.ts';
  • Output
import './upload/upload.js';

Additional context

Proposed a solution here: #473

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions