Skip to content

Commit

Permalink
fix: Syntax Error: Invalid or unexpected token with .png
Browse files Browse the repository at this point in the history
  • Loading branch information
kengo nakamura committed Apr 27, 2018
1 parent a0a7dc6 commit 20c23a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/@vue/cli-plugin-unit-jest/generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module.exports = api => {
],
'transform': {
// process *.vue files with vue-jest
'^.+\\.vue$': 'vue-jest'
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub'
},
// support the same @ -> src alias mapping in source code
'moduleNameMapper': {
Expand Down
1 change: 1 addition & 0 deletions packages/@vue/cli-plugin-unit-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"execa": "^0.9.0",
"jest": "^22.4.3",
"jest-serializer-vue": "^1.0.0",
"jest-transform-stub": "^1.0.0",
"vue-jest": "^2.5.0"
},
"devDependencies": {
Expand Down

0 comments on commit 20c23a8

Please sign in to comment.