socketsupply / socket-examples

Socket Runtime Examples – see how your favorite front-end framework is used to build cross platform UIs
https://socketsupply.co/guides
MIT License
117 stars 12 forks source link

No socket supply in vite example #72

Closed andymans closed 1 year ago

andymans commented 1 year ago

the vite example works great until you try to put anything "socket"-related into the window i.e. trying to import @socketsupply/socket , socket:application or similar. That's a pity.

andymans commented 1 year ago

So one possible solution is to create a vite.config.js like so export default { build:{ rollupOptions: { external: [/socket:.*/] } } } This will stop vite / rollup from erroring out with a 'module not found' and will allow the vite part of the build to execute . From there, the ssc build can kick in and build the runnable application.