yarn build command fails with styled components in ssg mode
See original GitHub issueDescription
When running yarn build
with babel-plugin-styled-components it fails with error:
[vite-plugin-ssr:autoFullBuild] Cannot read properties of undefined (reading 'withConfig') [vite-plugin-ssr:autoFullBuild] Cannot read properties of undefined (reading 'withConfig') (x2) error during build: TypeError: Cannot read properties of undefined (reading 'withConfig')
without babel-plugin-styled-components it fails with error:
[vite-plugin-ssr:autoFullBuild] styled.div is not a function [vite-plugin-ssr:autoFullBuild] styled.div is not a function (x2) error during build: TypeError: styled.div is not a function
vite.config.ts
/renderer/_default.server.page.tsx
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Vite js yarn build command fails with styled components in ssg ...
Description. When running yarn build. with babel-plugin-styled-components it fails with error: [vite-plugin-ssr:autoFullBuild] Cannot read ...
Read more >Problem with the setup of the project · Issue #3688 - GitHub
Add styled components as a dependency to packages/sandbox/package.json · Build the styled components by running yarn build · Start the next server ...
Read more >styled components not working in prod nextjs - You.com
I've followed the example for nextjs styled-components. The example works out of the box. However, once you create a styled-component, the className did...
Read more >React Boilerplate: Everything You Need to Quick-Start a New ...
This article shows you the boilerplate that we actively use when creating new React application projects. The boilerplate includes ...
Read more >styled-components | Yarn - Package Manager
styled -components ... Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s likely a styled-components bug, so I’d reach out to these guys.
Done.