Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.57 KB

Plugins.md

File metadata and controls

40 lines (29 loc) · 1.57 KB

Plugins

Plugin modules provide additional functionality - if you have one installed in your project, nwb will automatically find it when creating configuration and integrate the functionality it provides.

CSS Preprocessor Plugins

CSS preprocessors convert styles in alternative style languages to CSS, with the resulting CSS being passed through the standard nwb CSS pipeline.

Example: using the Sass plugin

If you want to use Sass in your project, install nwb-sass...

npm install --save-dev nwb-sass

...and you can now import .scss or .sass files from JavaScript modules:

import './styles.scss'

The sass plugin's unique id is sass - you can use this in webpack.rules config to provide configuration options for sass-loader:

module.exports = {
  webpack: {
    rules: {
      sass: {
        data: '@import "_variables"',
        includePaths: [path.resolve('src/styles')]
      }
    }
  }
}