Closed FrDH closed 2 years ago
Yes, you have to install Vite.js yourself and run it however you want to run it.
You should not access the Vite dev server directly via http://localhost:3000/
, you should access your website however you normally do in your local dev environment.
The Vite dev server is only for serving assets like JS, CSS, etc.
I think the issues you've having are unrelated to the Vite plugin itself.
Hi, I'm trying to get this to work, but without much result. Here's my setup:
Craft version 3.7.8 Craft Vite plugin version 1.0.20 Local server: MAMP PRO Local URL: http://localhost/test.com/public_html/
First question would be: after installing the Craft Vite plugin, do I need to manually install Vite.js ? Or does the plugin do this for me? (I manually installed it using
npm install vite --save-dev
)Second question: do I need to manually start the Vite server? After adding the scripts
dev
,build
andpreview
to the package.json I'm able to donpm run dev
and Vite will start a server at http://localhost:3000/. But following that link results in an ERR_CONNECTION_REFUSED error.Am I missing something in the docs? Or should the above simply work and am I doing something wrong?
Thanks in advance!