Skip to content

Commit

Permalink
Apply workaround for NextJs bug vercel/next.js#11164
Browse files Browse the repository at this point in the history
  • Loading branch information
aantthony committed Mar 28, 2020
1 parent 7fb69c0 commit 2b52cf5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/loaders/img-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ const applyImgLoader = (

webpackConfig.module.rules.push({
test: getHandledFilesRegex(handledImageTypes),
issuer: {
// Next.js already handles url() in css/sass/scss files
test: /\.\w+(?<!(s?c|sa)ss)$/i,
},
oneOf: [
// add all resource queries
...getResourceQueries(nextConfig, isServer, optimize ? 'img-loader' : null, imgLoaderOptions, detectedLoaders),
Expand Down

0 comments on commit 2b52cf5

Please sign in to comment.