Open jwtong opened 2 years ago
@jwtong Thank yor for your feedback
Could you provide more context? So that we can help you ASAP.
For example:
Vue-cli, Nuxt.js, Webpack
etc.@JuniorTour This was from the Nuxt demo project actually (vue-template-babel-compiler-nuxt-project), and is consistent with my other project I am trying to set this up for. "nuxt": "^2.15.7", "vue-template-babel-compiler": "^1.0.0"
@jwtong Sorry for late reply.
Is your problem solved?
I just test Nuxt.js DEMO project again.
It will throw the same error when not config nuxt.config.js
:
build.loaders.vue
to your nuxt.config.js
:// nuxt.config.js
export default {
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
loaders: {
vue: {
compiler: require('vue-template-babel-compiler')
}
},
},
// ...
}
If the problem still not be solved, feel free to ask my again.
@JuniorTour Yes, so it now works with that config, just from upgrading to 1.0.2. There is now just a SSR issue, I know someone else opened a PR for that as well.
https://github.com/JuniorTour/vue-template-babel-compiler/issues/7
@jwtong Thank you for your help!
It is a bug indeed, I just published 1.0.3
to fix it.
npm install vue-template-babel-compiler@1.0.3 -D
// or yarn
yarn add vue-template-babel-compiler@1.0.3 -D
Now this compiler will work for SSR
too!
I also update vue-template-babel-compiler-nuxt-project
Thank you for your feedback again!
Doesnt work with latest nuxt project
Doesnt work with latest nuxt project
@f3ltron Thanks for your feedback.
I just test by this demo-nuxt-project with "nuxt": "^2.15.8"
and "vue-template-babel-compiler": "^1.0.6-0"
.
It works fine.
How do you use this lib?
Could you provide more details? For example:
nuxt.config.js
I'd be glad to help you use this lib.
Hi, Having error with demo-nuxt-project. I cloned the demo repo and started the project. then got the following error:
It is working while building but it doesn't work with npm run dev
Using node v12.22.4
Nuxt v2.15.7
Hi, Having error with demo-nuxt-project. I cloned the demo repo and started the project. then got the following error:
It is working while building but it doesn't work with
npm run dev
Using node v12.22.4 Nuxt v2.15.7
Currently, The nullish coealasing (??)
only work for node.js v14+
.
So a temp workaround is:
I'm still look into can we use it below v14, welcome for working toghther.
Thanks for your feedback.
Related:
npm Installed to vue 2 webpack project, added "compiler: require('vue-template-babel-compiler'),"
But code still crash on .?
Anybody who got this working ? Are there some additional installation settings needed ?
npm Installed to vue 2 webpack project, added "compiler: require('vue-template-babel-compiler'),"
But code still crash on .?
Anybody who got this working ? Are there some additional installation settings needed ?
@Songoo7
What is your Nodejs version? Currently this lib need nodejs v14 aboce.
Could your provide a reproduction repo or online demo?
It would be my pleasure to help you.
npm Installed to vue 2 webpack project, added "compiler: require('vue-template-babel-compiler')," But code still crash on .? Anybody who got this working ? Are there some additional installation settings needed ?
@Songoo7
What is your Nodejs version? Currently this lib need nodejs v14 aboce.
Could your provide a reproduction repo or online demo?
It would be my pleasure to help you.
Hello , I have node v16.15, webpack 3, babel 6, vue 2.4.4 . (tried to update to webpack 4 and babel 7, but was really not able to :) ) https://i.imgur.com/8Z6GBzi.png . Not sure how to do demo hmm, maybe copy package.json and then npm install and do some blank project uh oh ?
@Songoo7 What is the version of vue-loader
you are using?
If version is smaller than v15.0.0
, the compiler option is not valid. It only valid for vue-loader
>= v15.0.0
.
vue-loader v14 does NOT have this option to use vue-template-babel-compiler
.
"vue-loader": "^13.0.5", so I should raise to 15 ? I'll try if it let me.
I got to vue-loader 14.0.0. But sadly going to 15 is impossible for me :( tried to follow https://vue-loader.vuejs.org/migrating.html#notable-breaking-changes and https://vue-loader.vuejs.org/guide/#vue-cli . But those guides are not enough detailed for this. Added new loader, added new less sass configs installed less-loader, sass-loader but in the end got an hundreds and hundreds red errors :) .
invalid expression: Unexpected token '.' in
v1.0.0