Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not wait for hook:rollup to complete before finishing the script #120

Open
silverbackdan opened this issue May 15, 2023 · 1 comment

Comments

@silverbackdan
Copy link

silverbackdan commented May 15, 2023

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.

@danielroe
Copy link
Member

So sorry for the long delay on this. Can you provide a reproduction? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants