Skip to content

Find a way to reuse postcss instance #82

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

Closed
MoOx opened this issue Jun 18, 2015 · 7 comments
Closed

Find a way to reuse postcss instance #82

MoOx opened this issue Jun 18, 2015 · 7 comments

Comments

@MoOx
Copy link

MoOx commented Jun 18, 2015

Since you switched to postcss that would be nice to be able to use some plugins (like for example cssnext) via your module instead of duplicate parsing via another loader.
Are you open to that kind of enhancement ? That should not be a big deal to handle that right ?

@sokra
Copy link
Member

sokra commented Jun 19, 2015

I'm not sure if I would like to expose the PostCSS stuff from the css-loader. It's an implenentation detail. It's propably not a big performance issue... is it?

@MoOx
Copy link
Author

MoOx commented Jun 19, 2015

Not sure it's a big one, but if we can avoid that...
What about just adding a plugins options (an array) that accept multiple plugin that you can pipe using (.use()) in your module ? That's should be quick and you don't really expose anything ?

@magsout
Copy link

magsout commented Jun 19, 2015

it's a great idea, especially thanks to postcss that we can use the many plugins, including cssnext.

👍

@sokra
Copy link
Member

sokra commented Jun 20, 2015

That's should be quick and you don't really expose anything ?

This would expose it.

For now I'll keep it hidden. So you need the postcss-loader in addition to the css-loader for postcss plugins. That isn't so complex or inperformant.

@sokra sokra closed this as completed Jun 20, 2015
@MoOx
Copy link
Author

MoOx commented Jun 20, 2015

What are you afraid of ?

@MoOx
Copy link
Author

MoOx commented Jun 20, 2015

Indeed it's not complex. But that would be a sweet possible optimisation. And there is no small optimisation, there is just optimisations ^^

@markdalgleish
Copy link
Contributor

I agree with @sokra. PostCSS shouldn't be exposed as part of the public API. It's private implementation detail that we might want to move away from in the future. Allowing users to couple themselves to our internal technology choices makes it harder for us to manage change effectively going forwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants