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

Add important information about relative imports in css files #90

Open
danielniccoli opened this issue Sep 22, 2023 · 1 comment
Open

Comments

@danielniccoli
Copy link

I found a solution to a common problem, that was also talked about it here, but without a proper solution: #27

I think it would be very helpful if that info would be added to the docs. It took me hours to figure this out, and I would not want anybody else get troubled by this.

Add server.origin to your vite.config.js:

export default defineConfig({
    server: {
        origin: 'http://localhost:5173',
    },
})

You must use the exact same URL that is displayed when you start Vite. You can't even use 127.0.0.1 if vite runs on localhost or vice versa! It must be equal!

grafik

But this will work!

@noxan
Copy link
Contributor

noxan commented Mar 3, 2024

@danielniccoli many thanks for posting this, came across the same problem 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants