feat(rollup-plugin): expose version#5194
Conversation
wjhsf
left a comment
There was a problem hiding this comment.
Why do we need to do this? Why can't downstream tooling just read @lwc/rollup-plugin's package.json?
|
@wjhsf that's impractical due to differences between package managers, node versions, module systems. See a similar pull request here: rollup/plugins#1050 Also related 😭 : https://github.com/salesforce/lwc/pull/4897/files/c8e5fbb53df8d311bb4e232b1d0be7b8745904c3#r1854880767 |
|
TL;DR: @lwc/rollup-plugin might be coming in as a peer dependency and there's no specification around finding its package.json, unless the package.json exposes itself in the exports field, and that still requires (ha!) assuming a bunch of stuff. |
|
The impetus for this seems reasonable, and I don't see much of a downside. So 👍 to the PR. |
|
Thanks @divmain ! My immediate goal here is future-proofing the workarounds in vite-plugin-lwc for consumers other than myself. I'm also hoping that eventually #4628 is incrementally fixed. Then other plugins can start to work alongside instead of resorting to wrapping/patching a specific version. In my interpretation:
|
|
Karma tests tried to run with missing envs 🫠 |
|
/nucleus test |
Details
This PR exposes the rollup plugin version to facilitate interoperability with other plugins, which is required for supporting scenarios like #4628 in the long run.
See: rollup/rollup#4771
Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?
GUS work item