jaridmargolin / neutrino-contrib

A collection of neutrino plugins and presets (NOT OFFICIALLY SUPPORTED BY NEUTRINO)
5 stars 1 forks source link

Extractstyles with existing style rules #1

Open timkelty opened 6 years ago

timkelty commented 6 years ago

@barraponto has a very similar preset that manages to use existing style rules instead of deleting it: https://github.com/barraponto/neutrino-preset-extractstyles

This allows you to do something like, and retain your postcss rules:

  neutrino.use('neutrino-preset-web');
  neutrino.use('neutrino-middleware-postcss', postcssConfig);
  neutrino.use(extractStyles, {
    filename: '[name].[chunkhash].css',
  });

I'm currently using @barraponto's and it seems to work well. It seems like it would be best for the community if there were one canonical package, whichever it is.

Thoughts?

/cc @barraponto

barraponto commented 6 years ago

I wrote it to solve an issue a user brought up with https://www.npmjs.com/package/neutrino-middleware-postcss

I do not use it, though, so I would rather have someone else maintain it. It probably doesn't require a lot of maintenance, but I'd feel bad if it rots abandoned :(