Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case `develop-html`:
// We don't deal with CSS at all when building the HTML.
// The 'null' loader is used to prevent 'module not found' errors.
// On the other hand CSS modules loaders are necessary.
config.loader(`css`, {
test: /\.css$/,
exclude: /\.module\.css$/,
loader: `null`,
})
// CSS modules
config.loader(`cssModules`, {
test: /\.module\.css$/,
loader: extractTextPlugin(stage).extract(`style`, [
cssModulesConfig(stage),
`postcss`,
]),
})
return config
case `build-javascript`:
// we don't deal with css at all when building the javascript. but
// still need to process the css so offline-plugin knows about the
// various assets referenced in your css.
//
// It's also necessary to process CSS Modules so your JS knows the
// classNames to use.
config.loader(`css`, {
test: /\.css$/,