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

Consider making sass an optional peerDependency #253

Open
wojtekmaj opened this issue Feb 6, 2024 · 1 comment
Open

Consider making sass an optional peerDependency #253

wojtekmaj opened this issue Feb 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@wojtekmaj
Copy link

I believe there's a good amount of users using typescript-plugin-css-modules for, well, CSS modules. The ones using Sass will have to have sass dependency installed anyway in order for Sass to work in their project (correct me if I'm wrong).

Sass makes almost 50% of typescript-plugin-css-modules's install size:
https://packagephobia.com/result?p=typescript-plugin-css-modules
https://packagephobia.com/result?p=sass
so making it optional would significantly improve package install time. Especially since sass depends on chokidar which depends on fsevents which depends on (God forbid!) node-gyp.

Therefore, I think it would be worth considering making sass an optional peerDependency.

@mrmckeb
Copy link
Owner

mrmckeb commented Feb 11, 2024

Hi @wojtekmaj, we've definitely had a few requests around splitting out packages in the past.

Sass is heavily used by the users of this plugin, and is pretty much the only thing people raise issues about haha. The issue with removing the dependency is that it's VERY hard to tell users what's wrong when the plugin can't resolve Sass properly in their project. They might also have a version that's too new or too old, so we'd need to be very specific with supported ranges.

As an alternative path, we've talked about splitting this plugin up so that it has "transformers"(?) that need to be installed alongside it for things like Sass. That would take a little time to do though, which is why I haven't tackled it yet. But I think that would solve your issue?

@mrmckeb mrmckeb added the enhancement New feature or request label Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants