-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Fails Due to Unexpected Character in tinyld #29
Comments
Steps to Reproduce
Expected BehaviorThe build should complete successfully without errors. Actual BehaviorThe build fails with the above-mentioned error due to the unexpected character in Additional ContextThe issue seems to be related to the handling of non-JavaScript files or unexpected characters in the Environment
Vite config`error during build: 1: var N={TINYLD_CONFIG:"normal"};var y=/[,.。,、#%&/\+*¡!¿?[]!?;:…„“«»”"“_–—~]/gi,p=/[0-9]/g,S=/[\uFF10-\uFF19]/g,v=/\s\s+/g,j=/’/gi,H=/[\u0300-\u036f]/g;function X(a){return typeof a=="string"||a instanceof String}function V(a){return a.toLowerCase().replace(j,"'").replace(y," ").replace(S,i=>String.fromCharCode(i.charCodeAt(0)-65248)).replace(p,"").replace(v," ").trim()}function U(a){return a.normalize("NFD").replace(H,"")}var P={light:{TRAINING_UNIQUE_GRAMS:... and lines more` Thank you for your assistance! |
Hello, yes I remember a similar issue like 2 years ago. At the time it was a special UTF-8 character not supported by esbuild minification. And after reporting it to esbuild, it was fixed under 48h
One of the temporary workaround could be to use It's one of the downside of a library like tinyld, the dictionary cover many languages and includes a lot of utf8 characters that are not so usual in codebase. |
Did you find a work around to this @alexzhovnir ? |
I'm transitioning my project from Create React App (CRA) to Vite. The project runs without any issues using
npm run dev
, but fails to build withnpm run build
. The error is as follows:The text was updated successfully, but these errors were encountered: