razzle-plugin-scss
This package contains a plugin for using SCSS/SASS with Razzle
Usage in Razzle Projects
yarn add razzle-plugin-scss --dev
With the default options
// razzle.config.js moduleexports = plugins: 'scss';
Files with an ending in the name _.module.scss and _.module.sass will load as cssModules
example:
import s from './myfile.module.scss';
With custom options
// razzle.config.js moduleexports = plugins: name: 'scss' options: postcss: dev: sourceMap: false ;
Options
Please remember that custom options will extends default options using Object.assign
.
Array such as postcss.plugins WILL NOT BE EXTENDED OR CONCATED, it will override all default plugins.
postcss: object
default
dev: sourceMap: true ident: 'postcss' prod: sourceMap: false ident: 'postcss' plugins: PostCssFlexBugFixes
Set dev
to add config to postcss in development
.
Set prod
to add config to postcss in production
.
See postcss loader options to override configs.
sass: object
default
dev: sourceMap: true includePaths: pathsappNodeModules prod: sourceMap: false includePaths: pathsappNodeModules
Set dev
to add config to postcss in development
.
Set prod
to add config to postcss in production
.
See node-sass options to override configs.
sassModules: object
default
dev: sourceMap: true includePaths: pathsappNodeModules modules: true prod: sourceMap: false includePaths: pathsappNodeModules modules: true
Set dev
to add config to postcss in development
.
Set prod
to add config to postcss in production
.
See node-sass options to override configs.
css: object
default
dev: sourceMap: true importLoaders: 1 modules: false prod: sourceMap: false importLoaders: 1 modules: false minimize: true
Set dev
to add config to postcss in development
.
Set prod
to add config to postcss in production
.
See css loader options to override configs.
style: object
default
Style loader only used in development
environment.
See style loader options to override configs.
resolveUrl: object
default
dev: {} prod: {}
Set dev
to add config to postcss in development
.
Set prod
to add config to postcss in production
.
See resolve url loader options to override configs.