Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

180
Vistas
Is there a way we can modify manifest.json generated in dev-server mode

I am using webpack-manifest-plugin plugin to generate a manifest.json file. After that i have another plugin that runs after the complete build is done. There I want to modify the manifest.json.Now this works fine with prod build(we are doing writeFileSync to update).

But in the dev-server build manifest.json does not get updated(as it not present in the filesystem it is in memory). I want to update manifest.json after the complete build is done in dev-server-mode. In dev-server mode build will not use the local file system it will in memory.

compiler.hooks.done.tap('After Compilation', (stats) => {
     // some code to update the manifest.json
})

Please let me know any way to access manifest.json post build and update in dev-server. I tried afterEmit of webpack-manifest-plugin but I want it after the entire build is done.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Hi, as variant you can use plugin "copy-webpack-plugin" for webpack.

npm: https://www.npmjs.com/package/copy-webpack-plugin#filter

You can get manifest "content" and do whatever you want.

For instance: create file in development mode inside build folder.

const fs = require('fs')
const CopyPlugin = require('copy-webpack-plugin');

new CopyPlugin({
  patterns: [
    {
      from: 'public/manifest.json',
      transform(content) {
        // create manifest.json for development
        if (process.env.NODE_ENV === 'development') {
          fs.writeFile('./build/manifest.json', content, function (err) {
            if (err) throw err;
            console.log('Saved!');
          })
        }

        return content
      },
    },
  ],
})
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda