@viewdo/dxp-story-cli
Version:
README.md
20 lines (19 loc) • 533 B
JavaScript
/**
* Returns the rules to extract the css from any webpack module.
*
* @param {TextExtractor} cssExtractor - Instance of an extractor that will
* pull the contents of any css file into the css defined in the story info
*/
module.exports = cssExtractor => {
return {
module: {
rules: [{
test: /\.css$/,
loader: cssExtractor.extract({
fallback: 'style-loader',
use: 'css-loader'
})
}]
}
}
}