Minification Issues with Schema and Vite
Has anyone else had bundling / minification issues with Schema? Using Vite to bundle and minify a web app, and it seems like some of the unused exports from
becomes a floating expression after bundling:
and after minification it becomes
AST.ts aren't being tree-shaked correctly, e.g. this source code:becomes a floating expression after bundling:
and after minification it becomes
R+""; where R=Symbol.for("@effect/schema/annotation/Title"), which results in a nice little runtime error: Schema-929fa510.js:1 Uncaught TypeError: Cannot convert a Symbol value to a string. If I create a schema in my app that uses S.undefined, the undefinedKeyword export ends up being bundled correctly