You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
webpack-manifest-plugin is a super simple plugin that creates a manifest.json in the root directory that maps from entry points to their hashed contents.
With webpack-stream, the manifest.json file is never created. Using a hint from #147, I figured out the problem was that the plugin is writing to an in-memory filesystem that never gets written to disk.
This was the workaround that I hacked together:
path=require('path')fs=require('fs')...gulp.src(config.siteSrc).pipe(webpack({config : require('./webpack.config.js')},webpackCore,(err,stats)=>{// write the in-memory manifest to diskconstabspath=path.resolve(config.siteRoot+'/manifest.json')constcontent=stats.compilation.compiler.outputFileSystem.readFileSync(abspath)fs.writeFileSync(abspath,content)cb(err)})).pipe(gulp.dest(config.siteRoot))
This works, but it seems like one heck of a hack. Is this a bug in webpack-manifest-plugin? Is there something webpack-stream could do to make this workaround easier to find / unnecessary?
The text was updated successfully, but these errors were encountered:
I imagine either webpack-manifest-plugin needs to add their file to the compilation.assets, OR webpack-stream needs to extract all files in it's memory-fs instance. I appreciate your hack though!
webpack-manifest-plugin is a super simple plugin that creates a
manifest.json
in the root directory that maps from entry points to their hashed contents.With webpack-stream, the
manifest.json
file is never created. Using a hint from #147, I figured out the problem was that the plugin is writing to an in-memory filesystem that never gets written to disk.This was the workaround that I hacked together:
This works, but it seems like one heck of a hack. Is this a bug in
webpack-manifest-plugin
? Is there somethingwebpack-stream
could do to make this workaround easier to find / unnecessary?The text was updated successfully, but these errors were encountered: