create-socket-app
create-socket-app copied to clipboard
Create Socket App as a Vite generator wrapper
Vite has its own app generators for this list of frontend frameworks out of the box. "Others" include even more + there are TS templates.

Vite is simple to config, uses esbuild by default under the hood and is compatible with rollup plugins. It's also the base for SvelteKit (which is more opinionated, less configurable and have server support which we don't need, I use Vite in Svelte template).
Rollup and Vite together have more downloads then esbuild. Part of esbuild downloads are Vite downloads. Probably, some other downloads are other tools that use esbuild.

Vite has much more stars on GitHub than esbuild and it more contributors

I have a half-working Create Socket App tool experiment as a wrapper over Vite, will have a full-working prototype soon with dev server support and hopefully with Hot Module Replacement as well!
This should be a high-priority and be released along with a new version of Socket.
what we need is:
-
create vite
to install a template -
ssc init
- patch in the config (i.e.
[build] copy = 'dist'
) OR patch in thevite.config.[js|ts]
to add a rollup plugin I wrote for Redwood example (I'd go with the first option for now) - ~~patch
index.html
to have proper CSP and paths~~ not necessary once we merge a change with origin bundle URI
Hey, great work, any news on Vite integration/template? Even just something Alpha to play with?
Hey, great work, any news on Vite integration/template?
@ahwelgemoed Thank you. @chicoxyzzy is still working on it.
Vite template integration will be available shortly after the v0.5.0
release of Socket
@chicoxyzzy
I'm using 0.5.3 but don't see the vite option (for react).
also import * as app from "socket:application";
can't resolve the package dependency.
@richburdon we are blocked by a vite bug, but hopefully we can release new version next year.
Regarding the built-in modules issue, you probably need some Vite configuration. Please try configuration from this article
For anyone trying to get Vite to work with SSC, this is super helpful: https://gist.github.com/mecachisenros/12e3240a5d66cffa54089066f9ffe8ff