unbuild
unbuild copied to clipboard
add `copy` builder
Ref: https://github.com/nuxt/module-builder/issues/63
A builder similar to mkdist but copy them as is without any transforms. (We might support small things like ignore patterns)
Any updates on this?
Want to copy some default static assets (fonts, default pure string based templates) that included by my library as default without any transformation and without any import & export abilities.
I currently use this as workaround:
hooks: {
'build:done': async () => {
// copy all things under src/assets to dist/assets
const { copy } = await import('fs-extra')
await copy('src/assets', 'dist/assets')
},
},
Is this the correct way of using it?