Created
August 4, 2019 06:17
-
-
Save kdepp/40740eeb5e9398134ca50ace81122480 to your computer and use it in GitHub Desktop.
Avoid applying two modules to one resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config = { | |
module: { | |
rules: [ | |
{ | |
test: /\/raw\/.*\.scss$/, | |
use: ['raw-loader', 'css-loader', 'postcss-loader', 'sass-loader'] | |
}, | |
{ | |
test: (name) => /\.scss$/.test(name) && !/\/raw\//.test(name), | |
use: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'] | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment