Vue-jest: Ensure working with Vue 3 + custom babel config

Created on 29 Jul 2020  路  9Comments  路  Source: vuejs/vue-jest

All 9 comments

Should be good in 5.0.0-alpha.2

I got error in 5.0.0-aplha.3.

image

image

My Babel config

https://github.com/vueComponent/ant-design-vue/blob/feat-vue3/.babelrc

I will take a look at your project. I guess it isn't respecting .babelrc? 馃

I will take a look at your project. I guess it isn't respecting .babelrc? 馃

yeah, it works when I renamed it to babel.config.js.

I think the later versions of babel don't support .babelrc. Is this a good enough fix for your project? Or do we need to leave this open?

How to suport <script setup>?

I have not tried this yet. I was hoping it would "just work" - the SFC compiler (should) take care of it, mostly.

What happens when you tried it?

I have not tried this yet. I was hoping it would "just work" - the SFC compiler (should) take care of it, mostly.

What happens when you tried it?

@vue/runtime-core warns [Vue warn]: Property "x" was accessed during render but is not defined on instance. when I run the test script.

reproduction link: https://github.com/Wizard67/vue3-test

Yep, we need to do a check for <script setup>. This should be fairly easy, I will look into it tomorrow or Friday.

More info here: https://github.com/vuejs/rfcs/blob/sfc-improvements/active-rfcs/0000-sfc-script-setup.md#transform-api

Was this page helpful?
0 / 5 - 0 ratings

Related issues

emman27 picture emman27  路  7Comments

marcosmoura picture marcosmoura  路  4Comments

lancetharper picture lancetharper  路  6Comments

eddyerburgh picture eddyerburgh  路  7Comments

Loremaster picture Loremaster  路  7Comments