plugins
plugins copied to clipboard
feat(swc): sets filename property, so to make additional swc features…
Rollup Plugin Name: swc
This PR contains:
- [ ] bugfix
- [x] feature
- [ ] refactor
- [ ] documentation
- [ ] other
Are tests included?
- [ ] yes (bugfixes and features will not be merged without tests)
- [x] no
Breaking Changes?
- [ ] yes (breaking changes will not be merged unless absolutely necessary)
- [x] 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.
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.
LGTM