Open lpkobamn opened 3 days ago
Same with remix-run npx create-remix@latest try to import ThemeProvider
For both project you need to pass {ssr: {noExtrenal: ['@gravity-ui/*']}}
to vite config. Note that Start supports this option since version 1.77.6
Hello,
I'm experiencing an import error when trying to use
@gravity-ui/uikit
in my project. Upon starting the dev server, I encounter the following errors:Steps to Reproduce:
@gravity-ui/uikit
via npm:@gravity-ui/uikit
in the__root.tsx
file:Expected Behavior:
The dev server starts without errors, and components from
@gravity-ui/uikit
are successfully imported and used in the project.Actual Behavior:
I receive a syntax error when importing the module, indicating
Unexpected token 'export'
. There's also a warning suggesting to set"type": "module"
inpackage.json
or to use the.mjs
extension.Additional Information:
package.json File:
import "../index.css";
export const Route = createRootRoute({ meta: () => [ { charSet: "utf-8", }, { name: "viewport", content: "width=device-width, initial-scale=1", }, { title: "TanStack Start Starter", }, ], component: RootComponent, });
function RootComponent() { return (
); }
function RootDocument({ children }: { children: React.ReactNode }) { return (
); }
function RootProvider({ children }: { children: React.ReactNode }) { return{children} ;
}