Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global CSS cannot be imported from within node_modules #1564

Open
gsidsid opened this issue Apr 30, 2024 · 3 comments
Open

Global CSS cannot be imported from within node_modules #1564

gsidsid opened this issue Apr 30, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@gsidsid
Copy link

gsidsid commented Apr 30, 2024

What happens?

This has been an issue when using Scalar on pretty much every Next.js project I've tried it on. There usually is a workaround but it isn't straightforward.

What did you expect to happen?

If there was a simple way to pull styles externally that'd be ideal. Afaik the only way to really resolve this manually is by serving Scalar out of the API routes directory or by messing with CSS loaders.

How can we reproduce the issue?

Try using Scalar as a react component on any non-api route page in a Next JS app.

Swagger/OpenAPI Example

No response

@gsidsid gsidsid added the bug Something isn't working label Apr 30, 2024
@amritk
Copy link
Member

amritk commented Apr 30, 2024

Hey @gsidsid could you please provide a minimal reproduction? We will be building a proper Next.js integration, but maybe we can get something working in the meantime.

I just opened an issue to track the next.js integration work that you can subscribe to.
#1565

@gsidsid
Copy link
Author

gsidsid commented Apr 30, 2024

Will try and spin up a repo later. I'm currently trying to use Scalar in Nextra's docs template, which would be one way to hit this error.

@amritk
Copy link
Member

amritk commented Jun 5, 2024

Hey @gsidsid, styles are now external!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants