The only classnames substitute that does not have side effects 👏 #377
Replies: 10 comments
-
Ah, it's just dependabot spamming a bit😅 The only thing to do is to promote the package, but I've already gave up, don't know how to do it, spamming at reddit gave almost nothing😔 |
Beta Was this translation helpful? Give feedback.
-
I only found it on reddit after already finding it on npm and somewhere else. Write a blog post about it? |
Beta Was this translation helpful? Give feedback.
-
Maybe better. Do some PR's to popular repos that still use classnames? Replace them with cnbuilder and explain the benefits in the PR to the maintainer. Our rollup still detects classnames as a side-effects file because it's coming through the components in RMWC. If I could wish for a PR, that'd be the one. You can see it's referencing classnames like this: |
Beta Was this translation helpful? Give feedback.
-
Ive tried, most of maintainers be like "Eeeeh, dont wanna change thing that working. What? only 2 times faster? pff dont even bother" |
Beta Was this translation helpful? Give feedback.
-
But thanks for the share - i'll try to make pr to rmwc some time later. |
Beta Was this translation helpful? Give feedback.
-
Speed wasn’t the main thing for me. Too many competing on that already. It was the packaging that made rollup understand it can tree shake that was worth it. Not sure why all classname alternatives try to be so drop-in replacements that they need to be default exports in commonjs. 🤷🏽♂️
… On 8 Nov 2020, at 20:05, Anton Zinovyev ***@***.***> wrote:
But thanks for the share - i'll try to make pr to rmwc some time later.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Well default cjs default exports are mystery for mee too. Everyone anyway building with bundlers and somewhy developers still trying to satisfy these .5% masochists that uses cjs or worse umd🤦♀️ |
Beta Was this translation helpful? Give feedback.
-
@seriema by the way AFAIK there is plugin for rollup that gives the ability to replace modules build time. And since cnb can replace any of classnames, clsx or classcat without code change - you can use it easily |
Beta Was this translation helpful? Give feedback.
-
@xobotyi I gave it a few attempts to find what you meant and configure rollup to replace classname with cnbuilder but didn't get it to work. Do you have an example? |
Beta Was this translation helpful? Give feedback.
-
@seriema I remember right - this one: https://www.npmjs.com/package/@rollup/plugin-alias |
Beta Was this translation helpful? Give feedback.
-
Just wanted to say thank you. You deserve more stars. ⭐⭐⭐⭐⭐
I have tried replacing classnames with lukeed/clsx and jorgebucaran/classcat. Rollup fails to determine side effects in both of them. Your package is correctly marked with
sideEffects: false
in package.json which is a huge boon IMHO.Just wanted to say thank you and keep it up! I saw you have 229 commits to master since the last release. Looking forward to what that is. 😄
Beta Was this translation helpful? Give feedback.
All reactions