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

Remove vue-template-compiler when useless #2339

Conversation

paullaffitte
Copy link
Contributor

Since several issues complains about vue-template-compiler being installed even when not necessary. I tried to reorganize a little bit how Vue and JavaScript components depends on each other in order to remove any dependencies on Vue when using .js('source', 'dest').

Simply, instead of JavaScript depending on Vue, I made Vue depending on JavaScript, like it has already been done for Coffee, React, or similar. JavaScript should have the exact same behavior apart from anything related to Vue, and Vue should behave exactly the same. Components like Coffee and React should not be impacted since what is build with it should not relies on Vue.

Related issues:

@JeffreyWay
Copy link
Collaborator

JeffreyWay commented Apr 2, 2020

Sorry for just now getting to this....

The reason why the JavaScript component is linked to Vue is mostly due to legacy reasons. I've only briefly looked at this commit, but it seems like all existing mix.js() calls that expect Vue compilation will have to be updated to mix.vue(), right?

If so - this of course is a major breaking change that will have to wait for the webpack 5 upgrade.

@paullaffitte
Copy link
Contributor Author

Yes, as you said it's actually a breaking change. Do you have any idea about when this update will be available? Is there anything I can do to help shipping this upgrade faster?
Otherwise I could also make some modification to keep this change as a minor one, like aliasing by default mix.js() on the Vue class and adding an option somewhere to alias mix.js() on Javascript until we do this major release?

@sharifzadesina
Copy link

@JeffreyWay so we are not going to have this even in version 6.x?

@paullaffitte
Copy link
Contributor Author

I hope we will. I think JeffreyWay may have forgotten about it, but I don't know how should I contact him.

@innocenzi
Copy link

This is the only change that I'm waiting for to no longer use Webpack Encore and switch back to Mix. Hope this PR doesn't get forgotten.

@RomainMazB
Copy link

@JeffreyWay @paullaffitte

Just to mention that the vue-template-compiler is only for Vue2, so this PR is may be mandatory for vue3 support.

Sources:
Evan You said:

I think this is an issue that should be fixed in vue-cli-plugin-vue-next by not including vue-template-compiler (which is for 2.x only)
vue-template-compiler throws with v3.0.0-alpha.4

And another issue and merged PR in vue-cli-plugin-vue-next to remove it for vue3 support in vue-cli-plugin:

vue-template-compiler throws with v3.0.0-alpha.4

This maybe the first step for #2440

@JeffreyWay
Copy link
Collaborator

We’ve split Vue from the core mix.js() to deal with this issue.

@JeffreyWay JeffreyWay closed this Sep 28, 2020
@innocenzi
Copy link

Oh wow, it's happening. I'll be able to stop using Webpack Encore. Thanks. :D

@paullaffitte
Copy link
Contributor Author

So I guess you don't really enjoy when people contribute to your project, since you ended doing the same thing that I did again instead of just asking me to update my code. Kinda weird to call this "open source".

I think it's pretty obvious that I will not contribute to this project again.

@JeffreyWay
Copy link
Collaborator

@paullaffitte No, it's a very different implementation that @thecrypticace worked on as part of the webpack 5 update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants