Vite: Can a single component be built by vite?

Created on 31 May 2020  路  2Comments  路  Source: vitejs/vite

Is your feature request related to a problem? Please describe.

I am using vue cli to build a single component. Can vite do this?

Describe the solution you'd like

https://cli.vuejs.org/guide/build-targets.html#library

Describe alternatives you've considered

https://cli.vuejs.org/guide/build-targets.html#library

Additional context

I want to implement remote loading of components in a browser environment.
Now, I assign it to the window variable after

All 2 comments

It's doable by calling the underlying build API yourself with custom Rollup entry options.

But technically this is something that can be supported as built-in.

Let's track this in #330

Was this page helpful?
0 / 5 - 0 ratings