skip to Main Content

Question: I have recently switched my project from Webpack to Vite and need to serve static files at the root path. Specifically, I need to create static/styles/combined.css and static/js/bundle.js files. In my local development server, I have a route that depends on these files. Can someone suggest how to achieve this with Vite?

The technologies I’m using is ReactJS, Typescript, Ionic, Vite and yarn.

2

Answers


  1. Chosen as BEST ANSWER

    I was able to fix the issue by adding dummy folders and files to my public folder. This allowed them to be included in both my local development server and the build folder.


  2. You can watch this youtube video in which he is deploying and react with vite project to github after creating the static site(dist folder).watch video

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search