-
Notifications
You must be signed in to change notification settings - Fork 157
Force ES5 for TS compilation #250
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
Conversation
I think we could use a pretty basic regex to change that line to a Lines 22 to 25 in e0cbca7
|
This whole part is a bit brittle since we use code that is meant to end up in multiple (virtual) files and concat it into one piece of code. If I were to have a top-level variable or function called |
I would say so - I experimented a bit to try and get other variables to conflict, no luck, but I'm sure it's possible. I am not really sure on the best way to solve this problem 🤔 Maybe we need some way to hoist up the common imports and do not duplicate them. That would not solve the top level render conflict you pointed out, though. I pinged a maintainer of ts-jest to get some ideas, he may have some experience around this. Edit: he suggests asking the babel team: #238 (comment). I will play around a little more and see if I can think of a better approach. |
Hi, come back to this I have a suspicion. It seems like the error is thrown because in the final If that is the case, the
I’d recommend to use AST transformer over regex when dealing with transpiling codes |
I think you are right - using I think that we should make a new codebase for a TypeScript and ts-jest based solution that implements the best patterns that I learned from looking at other jest transformers, and pin it to Jest versions like ts-jest does - supports both Vue 2.x and 3.x, and multiple jest versions, is very difficult in a single codebase. |
ya, agree. Maybe you can setup the base structure 1st and others can start contributing, also worth to write down in an issue about all the plans :) |
Yep, we definitely need a good "plan of attack". |
This prevents
const vue_1 = require('vue')
from conflicting, since it will dovar vue_1
instead.This feels pretty bad, I don't know the correct solution. 🤔