-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
No transformers found for .vue with Vue 3 and Parcel 2 #5325
Comments
Try the nightly version: |
Thank you. Installed Tried to add |
Maybe you still have the |
Tried removing |
That would be great! |
This may be an issue related to #4935. |
Scratch that, I found the issue. We depend on |
So the problem is that https://unpkg.com/browse/@vue/runtime-core@3.0.2/dist/runtime-core.cjs.js is missing that assignment?
Well, scope-hoisting doesn't work with HMR; so we use the |
Do you still want me to try create a sample project with the error reproduced? Seems like you already found the issue :) |
I don't think that's necessary anymore, indeed. The fact that only the ESM build supports HMR is...peculiar, but given that Vue is so incredibly popular, it may be necessary to either accommodate to their build system, or file an issue requesting they add the HMR runtime to CommonJS. |
Could you do that? That would be the simplest solution here. |
I might be missing something, but on their https://v3.vuejs.org/guide/installation.html installation page they are only referring to esm with Parcel, and never mention CommonJS on the whole page. |
hi @Znarkus @101arrowz @mischnic wanted to let you know that I am seeing the same |
For now, you'll unfortunately have to use |
Thanks. I'm building now with
Any advice on proper way to import Vue 3 with Parcel 2? |
import { createApp } from 'vue';
createApp(MyComponent).mount('#app'); That's the recommended way to do it. If you really want to import everything, then: import * as Vue from 'vue';
|
On a side note, we need to add support for runtime globals. |
Any progress on this? I had a search through the Vue issues for |
This is a bug with Parcel, not Vue. The Vue team is reluctant to implement a simple fix on their end, so we're waiting on that. Check the linked issue for more info. I'm worried we may have to add a custom fix just for Vue. The issue is that they assume all bundlers use ES Modules all the time, so they remove HMR code from the CommonJS variant. However, Parcel saves time bundling with CommonJS in development mode and only uses ESM in production. Right now, the fix is to disable HMR or patch |
Got it, thanks for clarifying! |
Upstream has been fixed, just need to wait for a release to update Parcel. @mischnic could you update the semver to |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Just wanted to add that I'd like to use this in a production app that I'm working on, so if there's anything I can do to test or help out make HMR + Vue3 work let me know. It looks like we need to wait on Vue team to make an update on their end first, then later on you will be able to add this patched version Vue to Parcel? Also @101arrowz or anyone else -- apologies for this being off topic, but is there a specific community or place I could join and participate in to help push things forward with Parcel 2 and Vue 3 << this is my ideal JS dev stack for use in a production app and I'd love to share my experience/issues if it could be of help somewhere. thanks for the updates @101arrowz! |
In terms of testing Vue 3, it would be helpful if you could use the patch I mentioned above to temporarily test HMR, but as far as I remember it's still broken in some ways and doesn't really work properly due to some issues mentioned in #4935. I created the transformer, so you can mention me if you find any issues with it. I'm not part of the Parcel team @bitterloa, but I believe they use Height quite a bit to communicate internally. If you want to help contribute or communicate, GitHub is probably the best way from what I can tell, but maybe @mischnic can give more complete advice 😄 |
AFAICT, the
Well, "communicate". Height is more of an ever-growing Todo list of high-level problems (e.g. architectural improvements, ideas for breaking changes before we the v2 release, ...).
Feel free to write something up in a Github discussion or issue. As far as I know, the open Vue problems are:
|
Vue 3.0.4 was just released. It would be great if someone could verify that it now works correctly (apart from #4935). |
Just tested, it's broken due to the new requirement for scopeID rather than it being optional, but after hotfixing the logic it works. I'll add the fix to #4935? |
I can test over the next few days as well. This past weekend I tried to use Vue 3.0.4 but it wasn't available yet. |
If it's not too complicated too fix... |
I've updated the Vue transformer "HMR fix" (not really at this point, but oh well). When #4935 is merged this issue can be closed. |
I cloned your repo, ran However, I got <template>
<img class="logo" alt="Vue logo" src="./assets/logo.png"> <!-- FROM HERE -->
<HelloWorld :msg="msg"/>
<div class="btn">
<el-button type="primary" @click="startHacking">
Get Started
</el-button>
</div>
</template> @101arrowz any ideas? |
I'll look into this today, but that error indicates that there isn't a transformer for |
This should be a url dependency, which would always work (just like in "real" HTML) |
Well, the |
Sorry that I removed my post. I did it before seen your answers. The issue was in Parcel cache. Before moving to latest I have build it with beta-1. |
🐛 bug report
This seems like a rookie mistake, but I'm getting this error.
🎛 Configuration (.babelrc, package.json, cli command)
😯 Current Behavior
It seems like the basic doesn't work for me right now, I think I have double checked everything but can't figure out what's wrong.
🔦 Context
Trying to get started with Parcel 2 and Vue 3.
💻 Code Sample
index.js
App.vue
The text was updated successfully, but these errors were encountered: