Open MaxmaxmaximusAWS opened 3 years ago
In the meantime, install these:
yarn add @linaria/core @linaria/react
yarn add -D @linaria/babel-preset @linaria/shaker @linaria/webpack-loader next-linaria@1.0.0-beta
Note: you have to install the beta for next-linaria, otherwise you'll need to install the linaria
package (kinda old version) instead of those 5 and do a slightly different setup.
Then add this to your babel config: presets: ['@linaria']
and wrap your next.config.js options with the default export from next-linaria withLinaria()
A more hands-on example from a package of mine: https://github.com/hyoretsu/aufklarung-site
Hey, @hyoretsu, how did you solve the issue of Error: Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!
? Or did you not get it at all?
Hey, @hyoretsu, how did you solve the issue of
Error: Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!
? Or did you not get it at all?
I didn't encounter that issue actually, maybe because of my previous setup. (working repo's in the comment above)
Hey, @hyoretsu, how did you solve the issue of
Error: Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!
? Or did you not get it at all?I didn't encounter that issue actually, maybe because of my previous setup. (working repo's in the comment above)
Hmm, I see. Thanks for responding. Guess I'm gonna have to wait for them to have a nextJS example 😗
Hi @Gabriel-Alves-Cunha
I think, your problem is related to https://github.com/callstack/linaria/issues/845
How to use with NextJS + typescript?