Skip to content

Commit

Permalink
chore: show displayName of styled components in devtools (#7830)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamil314 authored Oct 24, 2024
1 parent ad4595b commit 113f9eb
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
"traverse": "^0.6.6",
"ts-node": "^7.0.1",
"typescript": "4.9.5",
"vite-plugin-babel-macros": "^1.0.6",
"vite-plugin-pwa": "^0.20.0",
"vitest": "0.25.5",
"vitest-fetch-mock": "^0.2.1"
Expand Down
19 changes: 18 additions & 1 deletion packages/client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,24 @@ export default defineConfig(({ mode }) => {
crypto: 'crypto-js'
}
},
plugins: [htmlPlugin(), react(), tsconfigPaths(), VitePWAPlugin()],
plugins: [
htmlPlugin(),
react({
babel: {
plugins: [
[
'babel-plugin-styled-components',
{
displayName: true,
fileName: false
}
]
]
}
}),
tsconfigPaths(),
VitePWAPlugin()
],
test: {
environment: 'jsdom',
setupFiles: './src/setupTests.ts',
Expand Down
Loading

0 comments on commit 113f9eb

Please sign in to comment.