Skip to content

Commit

Permalink
Fix the regex used for test in the webpack rule
Browse files Browse the repository at this point in the history
The period wasn't getting escaped properly and was matching any character. This fixes #77.
  • Loading branch information
danoc authored Oct 21, 2021
1 parent 3095b20 commit 4e69358
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = ({ dynamicAssetPrefix = false, ...nextConfig } = {}) => {
}

config.module.rules.push({
test: new RegExp(`\.(${nextConfig.fileExtensions.join('|')})$`),
test: new RegExp(`\\.(${nextConfig.fileExtensions.join('|')})$`),
// Next.js already handles url() in css/sass/scss files
issuer: /\.\w+(?<!(s?c|sa)ss)$/i,
exclude: nextConfig.exclude,
Expand Down

0 comments on commit 4e69358

Please sign in to comment.