Open tysian opened 2 years ago
Everything would be working properly with [filename]
if it were replacing dots by a permitted character.
As a clear example, notice the use of the word Back.tsx
multiple times as a css selector in the image below:
In the example above, If I manually replace Back.tsx
by Back_tsx
(in both occurences, definition and reference) the styles are then properly applied.
I have the same issue
Verify canary release
Provide environment information
What browser are you using? (if relevant)
Chrome 104.0.5112.102
How are you deploying your application? (if relevant)
StackBlitz
Describe the Bug
Emotion styles are not applied if custom
compiler.emotion.labelFormat
is provided with[filename]
or[dirname]
in it.[dirname]
is not replaced by actual directory name, it just stays as[dirname]
[filename]
causes that styles are not appliedExpected Behavior
Styles should applied correctly with custom
labelFormat
format.Link to reproduction
https://stackblitz.com/edit/nextjs-a39s3g?file=pages/index.js
To Reproduce
@emotion/react
and@emotion/styled
Create Next.js config file and set custom
labelFormat
, eg.module.exports = nextConfig;