Closed ambar closed 2 years ago
@ambar Thanks for reporting -- I can reproduce this error using esbuild@0.15.12 (though I can't reproduce it using vite@3.2.2). During minification, esbuild by default renames function names, and colorjs.io relies upon function names in its default package export. You can disable the esbuild feature by adding --keep-names
to your command:
esbuild --bundle --minify --keep-names input.js --outfile=bundle.js && node bundle.js
@jgerigmeyer You should run vite build
to verify bundled result.
Bug
Using vite@3.2.2 or esbuild@0.15.12
Reproduce
input.js
bundle: