Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

183
Views
How to prevent creating a nested output directory in vite.js

For my vite app, I'm looking to have multiple entry points. In this case, I moved my index.html into src/main. After building, I noticed that there are nested directories in my dist folder which is not what I wanted.

I've been reading the rollup docs to find the correct option to prevent this but no luck. Any ideas?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I had the same problem as you and after hours of searching this is how I solved it:

  1. Create js file (build.js - or whatever name you want)

  2. In this build.js file with some help from nodejs file system module(fs) you can modify structure of dist folder as you want.

  3. Finally, modify package.json file to run build.js file after vite build command, for example: "build": "vue-tsc --noEmit && vite build --mode=production && node PATH_TO_YOUR_BUILD_JS_FILE"

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!