Skip to content

Commit

Permalink
Update style-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed May 30, 2023
1 parent a54ea94 commit b134e29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion {{cookiecutter.project_shortname}}/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"react": "^16.8.6",
"react-docgen": "^5.4.3",
"react-dom": "^16.8.6",
"style-loader": "^0.23.1",
"style-loader": "^3.3.3",
"styled-jsx": "^3.2.1",
"webpack": "^5.84.1",
"webpack-cli": "^5.1.1",
Expand Down
3 changes: 0 additions & 3 deletions {{cookiecutter.project_shortname}}/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ module.exports = (env, argv) => {
use: [
{
loader: 'style-loader',
options: {

This comment has been minimized.

Copy link
@ohxyz

ohxyz Aug 23, 2023

You'll still need this in Webpack 5. So CSS files in assets directory in your project are more likely to override when CSS selectors having the same weight.

Refer to insertAtTop function from https://webpack.js.org/loaders/style-loader/#function

insertAt: 'top'
}
},
{
loader: 'css-loader',
Expand Down

0 comments on commit b134e29

Please sign in to comment.