vite-plugin-alphatab-copy: path computing issue on github pages / maybe Ubuntu in general #1577
Closed
1 task done
Labels
area-bundlers
Related to the bundler plugins like webpack and vite
platform-javascript
Related to the JavaScript version of alphaTab
state-accepted
This is a valid topic to work on.
type-bug 🕷️
Is there an existing issue for this?
Current Behavior
I'm trying to deploy an app containing alphaTab on github pages, which is built using vite / alphaTab vite plugin.
On github pages the build fails while the
vite-plugin-alphatab-copy
plugin is trying to copy some assets into the public folder.https://github.com/bali182/alphatab-vite-build-bug-repro/actions/runs/9906924688/job/27369512708
Messages are like this:
The file names are doubly present in the path its trying to copy from:
'/home/runner/work/stick/stick/node_modules/@coderline/alphatab/dist/soundfont/LICENSE/LICENSE'
To see what's happening, I made a simplified version of
copyAssetsPlugin.ts
and when running it as an individual plugin and logging thefiles
incopyFiles
, it seems like on gh pages (maybe on Linux on general, IDK) thereaddir
functionsfile
already has the full file path. So this:Results in this:
And
file.path
has the full path of the file. So appending the file name again will result in double file names.Expected Behavior
The build to succeed
Steps To Reproduce
Here is a simple repro to reproduce this with the latest vite and alphatab versions:
https://github.com/bali182/alphatab-vite-build-bug-repro
And here are the logs of a failed run
https://github.com/bali182/alphatab-vite-build-bug-repro/actions/runs/9906924688/job/27369512708
Link to jsFiddle, CodePen, Project
https://github.com/bali182/alphatab-vite-build-bug-repro
Found in Version
1.4 (alpha)
Platform
Web
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: