You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Not really a problem, more like a limitation from what I could find in the documentation, and a stroll through the code. I might be jumping the gun a bit, but I seem to be unable to use this outside the defined structure. I don't seem to be able to run it from other places.
Example:
server on port 9000 only has an index.html file, with the script src as http://localhost:3000/something.js (vite dev server), the first error it will get is about cors. Setting it in vite.config.js doesn't work, probably some order hierarchy issue, If i go to vite's dist directory in node_modules and add it after creating the Koa app, this error goes away.
Now, the second error, is that it is trying to access files under [http://localhost:9000]/index.css for example, instead of localhost:3000, also the websocket is ws://localhost:9000 instead of the proper vite's dev server: ws://localhost:3000
Describe the solution you'd like
While developing, I think there should be a way to to proxy the index.html content, as this would allow vite to be used in a lot more contexts, for example with web server serving php files, like some other tools do (webpack, browsersync, etc).
Describe alternatives you've considered
I haven't considered any. Just trying a major step up in speed from webpack.
Additional context
Personally, this request primarily comes from the fact that I have a lot of laravel projects and would be nice to be able to use vite for them.
Cheers, and congrats on the amazing job on this.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Not really a problem, more like a limitation from what I could find in the documentation, and a stroll through the code. I might be jumping the gun a bit, but I seem to be unable to use this outside the defined structure. I don't seem to be able to run it from other places.
Example:
server on port 9000 only has an index.html file, with the script src as http://localhost:3000/something.js (vite dev server), the first error it will get is about cors. Setting it in vite.config.js doesn't work, probably some order hierarchy issue, If i go to vite's dist directory in node_modules and add it after creating the Koa app, this error goes away.
Now, the second error, is that it is trying to access files under [http://localhost:9000]/index.css for example, instead of localhost:3000, also the websocket is ws://localhost:9000 instead of the proper vite's dev server: ws://localhost:3000
Describe the solution you'd like
While developing, I think there should be a way to to proxy the index.html content, as this would allow vite to be used in a lot more contexts, for example with web server serving php files, like some other tools do (webpack, browsersync, etc).
Describe alternatives you've considered
I haven't considered any. Just trying a major step up in speed from webpack.
Additional context
Personally, this request primarily comes from the fact that I have a lot of laravel projects and would be nice to be able to use vite for them.
Cheers, and congrats on the amazing job on this.
The text was updated successfully, but these errors were encountered: