How to import solidjs core as external library

I would like to delivery my code to browsers as 2 parts. The first part is solidjs core and the second is mine. So is there anyway to tell vite that treat any import * from 'solid-js' as import * from '/solid-js.js' in the browser? I saw an option moduleName in solid plugin for vite but not sure if it is the one I'm looking for as the build output didn't left solidjs/web out of the bundle.
No description
3 Replies
lxsmnsyc
lxsmnsyc13mo ago
Utilize code-splitting
Đăng Tú
Đăng TúOP13mo ago
You means like use a 3rd party build tool or it is an option in vite?
Đăng Tú
Đăng TúOP13mo ago
I think this is the one: https://sambitsahoo.com/blog/vite-code-splitting-that-works.html @lxsmnsyc 🤖 thanks for the keyword
Vite code splitting that just works | Sambit Sahoo
Vite is an amazing tool that makes the DX while building apps a lot better. While vite brings pre-configured and optimized build setup with rollup, code-splitting isn't setup effectively. In this article we are going to discuss how to code-split vite powered apps effectively.
Want results from more Discord servers?
Add your server