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

532
Views
Múltiples entradas con Vite

Tengo múltiples entradas cuando construyo mi aplicación con vite. Mi configuración se ve así:

 export default defineConfig({ plugins: [ react(), eslintPlugin() ], build: { rollupOptions: { input: { test1: resolve(__dirname, '/test1.html'), test2: resolve(__dirname, '/test2.html') } } } });

La salida se ve así:

 dist |-test1.html |-test2.html |-assets

Lo que realmente quiero es algo como esto:

 dist |test1 |-index.html |test2 |-index.html |-assets

es posible?

Gracias

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

0

El resultado de la compilación normalmente coincide con la estructura de directorios del archivo de entrada, por lo que, en su caso, podría mover esos archivos a los directorios respectivos en el directorio raíz del proyecto:

 my-project/ |- test1/ | `- index.html `- test2/ `- index.html

Luego configure build.rollupOptions.input de Vite para que apunte a esos archivos:

 // vite.config.js import { defineConfig } from 'vite' import { resolve } from 'path' export default defineConfig({ ⋮ build: { rollupOptions: { input: { test1: resolve(__dirname, './test1/index.html'), test2: resolve(__dirname, './test2/index.html'), }, }, }, })

manifestación

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!