You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing vite build with the alphaTab plugin I get an error. I don't experience any issues when I run it in development mode using the vite command. The error when running vite build looks like this:
vite v4.5.3 building for production...
✓ 100 modules transformed.
✓ built in 610ms
[vite-plugin-alphatab-url] plugins is not a function
file: E:/code/dawn/node_modules/@coderline/alphatab/dist/alphaTab.mjs
error during build:
TypeError: plugins is not a function
at bundleWorkerEntry (E:\code\dawn\node_modules\@coderline\alphatab\dist\alphaTab.vite.js:1688:24)
at async workerFileToUrl (E:\code\dawn\node_modules\@coderline\alphatab\dist\alphaTab.vite.js:1654:29)
at async Object.transform (E:\code\dawn\node_modules\@coderline\alphatab\dist\alphaTab.vite.js:1852:32)
at async transform (file:///E:/code/dawn/node_modules/rollup/dist/es/shared/node-entry.js:24449:16)
at async ModuleLoader.addModuleSource (file:///E:/code/dawn/node_modules/rollup/dist/es/shared/node-entry.js:24649:30)
The relevant piece of code in in alphaTab.vite.js looks like this:
constbundle=awaitrollup({
...rollupOptions,
input,// plugins seems to be missing hereplugins: awaitplugins(newBundleChain),preserveEntrySignatures: false});
Expected Behavior
The build to successfully complete
Steps To Reproduce
My config is pretty simple (it's a typescript project):
// In one file:import{AlphaTabApi,synth}from'@coderline/alphatab'// In another file, just typings:importtype{CoreSettings,PlayerSettings}from'@coderline/alphatab'
It's my bad, my vite version was one major version behind current. Should have started with checking that. After updating to vite 5.3.3 it builds fine both alphatab 1.3 and 1.4 alpha
Is there an existing issue for this?
Current Behavior
When executing
vite build
with thealphaTab
plugin I get an error. I don't experience any issues when I run it in development mode using thevite
command. The error when runningvite build
looks like this:The relevant piece of code in in
alphaTab.vite.js
looks like this:Expected Behavior
The build to successfully complete
Steps To Reproduce
My config is pretty simple (it's a typescript project):
I'm trying to build using:
This is my
vite.config.ts
fileAnd this is how I import alphatab:
Link to jsFiddle, CodePen, Project
I don't know if this can be demonstrated on jsfiddle or codepen, but I made a very simple repro repo:
https://github.com/bali182/alphatab-vite-build-bug-repro
Found in Version
1.3
Platform
Web
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: