danielroe / danielroe/rollup-plugin-pure
Runs after tree-shaking
- Dominant language
- TypeScript
- Stars
- 88
- Forks
- 6
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 7
Description
Thanks for amazing plugin.
I just found strange behavior, but don’t have experience to reproduce in other build.
In [our project](https://github.com/hplush/slowreader/), the plugin doesn’t affect JS bundle size (but change source code) until I [change calling order](https://github.com/hplush/slowreader/commit/9b4cbadafa691e93b8e704e939b537ceceb52986):
```diff
return {
+ enforce: 'pre',
name: 'rollup-plugin-pure',
transform: {
- order: 'post',
+ order: 'pre',
```
Seems like on some systems plugins runs before Vite/Rollup does static analysis for tree-shaking.
Here is our [Vite config](https://github.com/hplush/slowreader/blob/9b4cbadafa691e93b8e704e939b537ceceb52986/web/vite.config.ts).
Contributor guide
Assessment
This issue has not been assessed yet.