Skip to content

Plugin API - CSS Preprocessors #6

Closed
@insin

Description

How much magic do we really want here?

Thinking about CSS preprocessors, It would be nice if you could just install an nwb-sass, nwb-less etc. package which would hook these up with default pipelines for static and server builds like CSS currently has. So a bit of package.json scanning for those.

All they really need to provide is a unique name and test and loader config (absolute path to a dependency owned by the plugin). What if this was the entire nwb-sass plugin?

module.exports = {
  cssPreprocessor: {
    sass: {
      test: /\.scss$/,
      loader: require.resolve('sass-loader')
    }
  }
}

We could potentially use whatever hook we add for this to allow the user to configure and manage their own preprocessor dependencies.

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions