Skip to content

Commit

Permalink
fix: webp static imports in jsx code
Browse files Browse the repository at this point in the history
  • Loading branch information
pnicolli committed Aug 18, 2023
1 parent d0ac84a commit b1ab875
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions razzle.extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ const modify = (webpackConfig, { target, dev }, webpackObject) => {
webpackConfig.module.rules.push(SVG_LOADER);

const urlLoader = webpackConfig.module.rules.find(urlLoaderFinder);
urlLoader.exclude = [/\.(png|jpe?g|webp)$/i, ...(urlLoader.exclude || [])];
urlLoader.exclude = [/\.(png|jpe?g)$/i, ...(urlLoader.exclude || [])];
// see: node_modules/razzle/config/createConfig.js
const IMG_LOADER = {
test: /\.(png|jpe?g|webp)$/i,
test: /\.(png|jpe?g)$/i,
use: [
{
loader: 'url-loader',
Expand Down

0 comments on commit b1ab875

Please sign in to comment.