zodex icon indicating copy to clipboard operation
zodex copied to clipboard

Browser

Open brettz9 opened this issue 1 year ago • 6 comments

Builds on #36.

feat: add esm build

Also:

  • docs: adds browser demo

brettz9 avatar Jun 19 '24 06:06 brettz9

While I like the simplicity of having browser ready JS, I don't like vendoring in zod. My leaning would be to just use vite, as we're already depending on it anyway

Gregoor avatar Jun 27 '24 07:06 Gregoor

Sorry, so you mean to include the demo, but for local use only—using Vite instead of Rollup/node-static, and not doing the GitHub Pages-ready bundling at all, right?

brettz9 avatar Jun 27 '24 08:06 brettz9

I've added #37 . If that meets your needs, I can rebase the other PRs fairly easily on top of it.

brettz9 avatar Jun 27 '24 09:06 brettz9

Uuh I must’ve missed the gh pages part sorry, will check again (looking at it from my phone atm, so it will be later). But in general I’d also use vite to do a static GitHub pages export

Gregoor avatar Jun 27 '24 09:06 Gregoor

Re: GitHub Pages, there's no special code for it--just by bundling it in vendor, the main branch could be configured on GitHub to run the demo web app.

But with your preference for Vite, though I've gotten things going with local use of vite in #37, if you wouldn't mind, I'll leave any static production deployment work to you, as the production configuration looks a little involved, and you might have your own ideas about how to do it anyways.

brettz9 avatar Jun 27 '24 09:06 brettz9

Happy to take prod deployment over, but it's gonna be a week or so until I have time to look into it

Gregoor avatar Jun 28 '24 08:06 Gregoor

I've amended this PR to be on top of a commit which removes React. I can amend to add back React if desired, but it sounded like that was the way you may be going.

brettz9 avatar Aug 17 '24 22:08 brettz9

Woohoo! Down to the last PR (assuming you want to remove React which this one has a commit for), though I know as it requires your intervention to get it deployed to production, it may take time for you to get to it. Should be great to have a browser build merged, and I can perhaps finally leave you with some peace. :-)

brettz9 avatar Sep 05 '24 14:09 brettz9

I dropped the removal of infer.ts from this PR (though I'll leave it to you on exporting it).

brettz9 avatar Sep 05 '24 21:09 brettz9

Closed in favor of #46

brettz9 avatar Sep 27 '24 13:09 brettz9