Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The new
@vue/compiler-sfc
generates code using ES module syntax. It is causing some problems with vue-cli: vuejs/vue-cli#5714 (comment)Easy fix is just use babel to compile the template code to commonjs module syntax. The idea for v5 was to be entirely
ts-jest
based, although even if I settarget: es5
etc intsconfig.json
I could not get it to work. This seems like the best solution, so people can use VTU and vue-jest with vue-cli out of the box.Testing
I tested this in a pretty primitive manner: create a new cli project:
Note I included babel and TypeScript and testing with jest.
Then
yarn test:unit --no-cache
and it failed. Then I just copy and pasted the newvue-jest
from the PR intonode_modules
and ranyarn test:unit --no-cache
and it passed. As long as CI passes, we should be good.resolves #258