Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a setting to switch to full vue build (with compiler) #368

Closed
husayt opened this issue Jun 8, 2020 · 5 comments
Closed

Add a setting to switch to full vue build (with compiler) #368

husayt opened this issue Jun 8, 2020 · 5 comments

Comments

@husayt
Copy link
Contributor

husayt commented Jun 8, 2020

Is your feature request related to a problem? Please describe.
Currently Vite is using runtime only build of vue (vue.runtime.esm-bundler.js)

Describe the solution you'd like
Having an option in vite config to switch between runtime only and full (with compiler) vue bundles.

Additional context
While it should be avoided, there are a number of usecases for compiling vue templates on the fly and it would be great if vue could support that. For example, we need a compiler build to run this simple example from vue website

@yyx990803
Copy link
Member

With 0.20.6+ you can just do:

alias: {
  'vue': 'vue/dist/vue.esm-bundler.js'
}

@husayt
Copy link
Contributor Author

husayt commented Jun 8, 2020

@yyx990803 works with run dev, but once bundled with "yarn run build" dynamic components don't render.

@vitejs vitejs deleted a comment from DJ-991 Jun 8, 2020
@yyx990803
Copy link
Member

@husayt please provide a reproduction in a separate issue.

@stuta
Copy link

stuta commented Jan 14, 2021

This does not work in Vite 2.0.0-beta.27.

alias: {
  'vue': 'vue/dist/vue.esm-bundler.js'
}

I tried to find an option in https://github.com/vitejs/vite/tree/main/packages/plugin-vue, but I could not find an option there.

How to set a build with compiler?

@yyx990803
Copy link
Member

Should be fixed by 54dab71, release soon

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants