fix: use webpack for dev-server to keep consistent css-module classnames

There's an inconsistency between webpack and next turbo's `localIdentName`

This also improves the hot-loading

fixes #440
This commit is contained in:
Mathias Schopmans
2024-03-25 10:45:28 +01:00
parent a8172e6579
commit 335ecf6d46
3 changed files with 17 additions and 23 deletions

View File

@@ -222,7 +222,7 @@ with a specified value. As an example, if you want to always show the subline in
the following rule:
```css
[class^="subline__Logo"] {
[class^="Logo_subline"] {
display: block;
opacity: 1;
}

View File

@@ -5,7 +5,7 @@
"techradar": "./bin/techradar.js"
},
"scripts": {
"dev": "next dev --turbo",
"dev": "next dev",
"build:icons": "npx @svgr/cli --typescript --no-dimensions --no-prettier --out-dir src/components/Icons -- src/icons",
"build:data": "tsx scripts/buildData.ts",
"build": "next build",

View File

@@ -1,7 +1,5 @@
module.exports = {
plugins:
process.env.NODE_ENV === "production"
? [
plugins: [
"postcss-nested",
[
"postcss-preset-env",
@@ -15,9 +13,5 @@ module.exports = {
},
},
],
]
: [
// No transformations in development
// because it won't affect turbo
],
};