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

112
Views
Vite.js not emitting HTML files in multi page app

I have a multi page app that I'm trying to build with Vite.js (migrating from Webpack). When building the Vite + React example code I see that it emits:

  • dist/index.html
  • dist/assets/<various assets>

However, when I try to make a multi page app as shown in the docs none of the HTMLs are emitted (but the rest of the content of /assets/ is there). Why is this?

// vite.config.js excerpt:
import { defineConfig } from 'vite'
import { dirname } from 'path';
import { fileURLToPath } from 'url';

export default defineConfig({
  root: 'client',
  build: {
    outDir: 'dist',
    rollupOptions: {
      input: {
        main: dirname(fileURLToPath(import.meta.url + 'index.html')),
        login: dirname(fileURLToPath(import.meta.url + 'login.html')),
      }
    }
  },
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try using the URL for file input as specified in vite doc

main: new URL('./client/index.html', import.meta.url).pathname
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!