Skip to content

Commit

Permalink
fix: css-loader file resolution bug introduced by CRA v4
Browse files Browse the repository at this point in the history
In recent commits, we upgraded our react-scripts version from 3.4.4
to 4.0.3. This is because CRA (create-react-app) v3 uses an outdated
version of eslint (facebook/create-react-app#8849). This introduced
a bug related to the css-loader library, which can no longer resolve
assets in the public folder:
- facebook/create-react-app#9870 (comment)
- webpack-contrib/css-loader#1136 (comment)

This commit fixes this bug by moving the referenced image to the
relevant sub-directory in the src directory.
  • Loading branch information
SingpassAuth committed Mar 15, 2021
1 parent 6517f61 commit 3766412
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
File renamed without changes
2 changes: 1 addition & 1 deletion src/styles/isomer-cms/pages/Media.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}

@mixin checkered-background-grid {
background-image: url('/img/transparent_bg.jpg');
background-image: url('../../img/transparent_bg.jpg');
background-size: 20px 20px;
background-repeat: repeat;
}
Expand Down

0 comments on commit 3766412

Please sign in to comment.