Skip to content

Commit

Permalink
feat(gatsby-plugin-sass): Enable url() resolution for modules (#16451)
Browse files Browse the repository at this point in the history
  • Loading branch information
Js-Brecht authored and GatsbyJS Bot committed Aug 8, 2019
1 parent 45376fe commit 90a345e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/gatsby-plugin-sass/src/gatsby-node.js
Expand Up @@ -27,12 +27,6 @@ exports.onCreateWebpackConfig = (
sassLoader,
],
}
if (useResolveUrlLoader && !isSSR) {
sassRule.use.splice(-1, 0, {
loader: `resolve-url-loader`,
options: useResolveUrlLoader.options ? useResolveUrlLoader.options : {},
})
}
const sassRuleModules = {
test: /\.module\.s(a|c)ss$/,
use: [
Expand All @@ -42,6 +36,16 @@ exports.onCreateWebpackConfig = (
sassLoader,
].filter(Boolean),
}
if (useResolveUrlLoader && !isSSR) {
sassRule.use.splice(-1, 0, {
loader: `resolve-url-loader`,
options: useResolveUrlLoader.options ? useResolveUrlLoader.options : {},
})
sassRuleModules.use.splice(-1, 0, {
loader: `resolve-url-loader`,
options: useResolveUrlLoader.options ? useResolveUrlLoader.options : {},
})
}

let configRules = []

Expand Down

0 comments on commit 90a345e

Please sign in to comment.