module-builder
module-builder copied to clipboard
Does not wait for hook:rollup to complete before finishing the script
I'm creating a module but it also has a layer directory. I think the method I want to use, most in-sync with the docs, is to simply copy the layer directory from source into dist. So to do this I've adjusted prepack
in my module to:
...
"prepack": "nuxt-module-build && npm run copy-layer",
...
Where the copy-layer
nom script will copy layer files.
However, when run like this, the build is not complete when copy-layer is called. I think this is because the hook function has not finished..
I'm not sure if this is an issue, possibly here, or possible in the unjs/mkdist repo - if it is an issue that needs to be addressed at all that is...
--edit-- I can confirm that by adding a small sleep command between the 2, that it will work.