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(swc): sets filename property, so to make additional swc features… #1761

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

klassm
Copy link
Contributor

@klassm klassm commented Aug 27, 2024

Rollup Plugin Name: swc

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

Background: When using the swc rollup plugin in vitest, debugging will not work. I assume this comes from the filename property not being set, as the documentation states:

The filename is optional, but not all of Swc's
functionality is available when the filename is unknown, because a subset of options rely on the filename for their functionality.

Setting a filename should not have any side effects, just make debugging and other features work.

… available

Background: When using the swc rollup plugin in vitest, debugging will not work. I assume this comes from the filename property not being set, as the documentation states:
```
The filename is optional, but not all of Swc's
functionality is available when the filename is unknown, because a subset of options rely on the filename for their functionality.
```

Setting a filename should not have any side effects, just make debugging and other features work.
@klassm klassm requested a review from tada5hi as a code owner August 27, 2024 11:50
@klassm
Copy link
Contributor Author

klassm commented Aug 27, 2024

If someone has a hint on how to test that, I would also add a test. I've looked at the existing tests, but both file and sourceMap seem to be exactly the same after the change.

@tada5hi
Copy link
Member

tada5hi commented Sep 3, 2024

LGTM

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

I agree with the assessment and think it is safe to merge.

@lukastaegert lukastaegert merged commit 5c04057 into rollup:master Sep 6, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants