-
Notifications
You must be signed in to change notification settings - Fork 915
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
[Feature Request]Plugin system for vue-loader like babel #1603
Comments
There is a You can pass the |
Thanks, I will try |
There is a little question troubles me, when component-compiler-utils calls So if I only want to execute |
@yyx990803 Sorry to bother in the closed thread, another question is, could I do After I found that both |
If you want to transform both templates and JavaScript at the same time, then what you really need is an extra loader before vue-loader that transforms the whole file. You can do that with a generic HTML transform tool (like posthtml) plus a generic JS transform toolchain (like acorn + estree-walker + astring). This is out of scope for |
Gotcha, thanks! |
What problem does this feature solve?
I want to parse a vue file(SFC) and modify(add/change/delete) some code within it, but it seems not easy for me to do that, but for a js file, you could do that easily due to the babel plugin system(it provides more simpler ways to do that).
I notice that there are a few repos which wanted to do this, like vue-sfc-parser, vue-parser, but is not enough to write a plugin.
So, based on the doc "you will only need it separately if you are writing build tools with very specific needs." in https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler, I think there is no anything like a plugin system, but that is really helpful for some specific needs if we have.
What does the proposed API look like?
I don't know to be honest, maybe something like babel plugin is good enough
The text was updated successfully, but these errors were encountered: