arnoson / kirby-vite

Use Kirby CMS together with Vite
MIT License
81 stars 7 forks source link

Feature Request #6

Closed scsskid closed 2 years ago

scsskid commented 2 years ago

Great Plugin, thanks btw

Would be great to have support for support multiple entrypoints:

build: {
    rollupOptions: {
      input: {
        'entry-point-a': path.resolve(__dirname, 'src/entry-point-a.tsx'),
        'entry-point-b': path.resolve(__dirname, 'src/entry-point-b.tsx'),
      },
    }
  },

maybe configurable like this

'arnoson.kirby-vite.entry' => [
    'entry-point-a' => 'entry-point-a.tsx',
    'entry-point-b' => 'entry-point-b.tsx',
]
arnoson commented 2 years ago

Glad you like it! Have you looked at the vite.config.js in the multi-page kit? I am not sure if it makes sense to add this feature to the plugin. If you configure it in the vite.config.js you have maximum flexibility. What do you think?

scsskid commented 2 years ago

I have seen your other project, its a very clever solution, I will look into this, thanks

I need mutiple templates to use one bundle, except for one template which uses a big 300kb bundle I guess using your setup, alle the lighter templates single bundles could import the shared code.

Thanks again