Open DarkGenius opened 4 months ago
+1
It`s Next.js problem - https://nextjs.org/docs/messages/css-npm
I found a solution for Next.js.
If you are using Next.js 13.1 or higher, you should define the transpilePackages option in next.config.js
:
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['@gravity-ui/navigation', '@gravity-ui/uikit'],
};
module.exports = nextConfig;
Example: https://stackblitz.com/edit/stackblitz-starters-izlcht?file=next.config.js,app%2Flayout.tsx
Before Next.js 13 you can try next-transpile-modules
@max-portador It's still "blinking" in your example, styles are properly loaded on the client side only.
It`s Next.js problem
I don't use Next.js at all and the problem is the same. Moreover, the problem is that when this package building, the styles are bundled to JS, not to separate CSS files.
+1