seek-style-guide-webpack
Webpack decorators for integrating with the SEEK Style Guide.
Installation
$ npm install --save-dev seek-style-guide-webpack
Setup
First, decorate your server Webpack config:
const decorateServerConfig = ; moduleexports = ;
Then, decorate your client Webpack config:
const decorateClientConfig = ; moduleexports = ;
Options
{ cssOutputLoader: <webpack loader> | 'style-loader' }
CSS Output Loader By default the client decorator will use style-loader
to handle the styles emitted from the seek-style-guide
. Alternatively, you can
pass in your own loader configuration, eg.
const decorateClientConfig = ;const MiniCssExtractPlugin = ; const config = // Webpack config... plugins: filename: 'style.css' } ; moduleexports = ;
Please note that, if your Webpack loaders aren't scoped to your local project files via the "include" option, the decorator will throw an error.
{ extraIncludePaths: Array<paths> }
Extra includes (optional) If you have other external node_modules that need to be compiled in the same way as the seek-style-guide then you can pass an extra parameter to the decorators.
moduleexports = ;
{ cssSelectorPrefix: string }
CSS Selector Prefix (optional) This selector prefix is automatically prepended to all selectors to ensure styles don't leak out into the global scope. For example, this is used for generating the standalone header & footer in the style guide.
moduleexports = ;
Contributing
Refer to CONTRIBUTING.md.
License
MIT.