Open KKoukiou opened 1 year ago
Could u please try the way as #100 first? It seems like you're both using absolute paths.
@linbudu599 hi, I meantioned above, 'If I use directory for the 'to' path it works, but I need to rename the asset so this is not a solution.'
This should be fixed in 2.1.1
, the dir only condition was removed so it works fine now, please try again.
Excellent, works fine @linbudu599 . Thank you!
I have an asset that looks like this: { from: '/home/kkoukiou/repos/cockpit/node_modules/@patternfly/patternfly/assets/fonts/RedHatFont-updated/RedHatText/RedHatText-updated-Bold.woff2', to: '/home/kkoukiou/repos/cockpit/dist/static/fonts/RedHatText-Bold.woff2'", }
The ./dist/static/fonts directory does not exist and therefore the plugin fails with: text: "ENOENT: no such file or directory, copyfile ...
If I use directory for the 'to' path it works, but I need to rename the asset so this is not a solution.
I believe this conditional directory creation could be removed https://github.com/LinbuduLab/esbuild-plugins/blob/a3df3e2798669801dd8aef537a46ad24d8df60ae/packages/esbuild-plugin-copy/src/lib/handler.ts#L77