I'm following the official Svelte for new developers blog post for my svelte app. It's working fine, and now I want to add a separate "admin" app. Except for interfacing the same database and being hosted on the same domain, it shares no components with my main app.
Would the best approach be to create a second svelte app and host it in a folder, or is there a way do to this in the same rollup?
npx degit sveltejs/template my-project-admin-page
Your rollup.config.js can return a an array instead, so you would get something like
export default [
{ ...config for normal app ...},
{ ...config for admin app ...}
]
I like to abstract some of the more common parts as well, in a project I am currently working on I have:
export default [
getConfig('index'),
getConfig('admin')
]
You could add extra parameters, the one here just points to the main entry point and uses the same name for the bundle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With