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

92
Views
¿Cuál es la mejor manera de usar dist y carpetas públicas en una aplicación webpack?

Estoy tratando de hacer un proyecto de paquete web, pero cada tutorial que veo en Internet usa la misma carpeta para activos y distribución , pero me gustaría saber si hay una mejor manera de administrar activos y archivos estáticos en una carpeta y construir todo en una carpeta Dist o Build más tarde.

La estructura seria:

 | /src -> every coding including css and other html pages. | /public -> index.html, favicon.ico... | /public/assets -> put images and other stuff here

y después:

 | /dist -> combine everything in here: index.html, js files and assets.
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Ese debería ser el punto del cargador de archivos.

Agregue esta regla a webpack.config.js

 { test: /\.(png|jpe?g|gif)$/i, loader: 'file-loader', options: { outputPath: 'assets', publicPath: 'assets', }, }

En webpack5, la regla puede ser esta, haga clic en módulos de activos para obtener más detalles

 { type: 'asset/resource', test: /\.(png|jpe?g|gif)$/i, generator: { filename: 'assets/[hash][ext][query]' }, }
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!