Closed doktordata closed 5 years ago
@doktordata Thanks for your pr and sorry for the late response. Yes, we need to switch to generateBundle.
however, I believe we cannot simply replace onwrite by generateBundle, as "onwrite" is executed "after the file has been written to disk.", and "generateBundle" is executed " immediately before the files are written in bundle.write()".
And this plugin actually needs to read the generated file on disk and insert it into HTML file.
I think we should use the writeBundle
hook.
Called only at the end of bundle.write() once all files have been written. Similar to the generateBundle hook, bundle provides the full list of files being written along with their details.
@r0skar you are probably right ;)
onwrite hook is replaced, close this pr.
Fix for #3