Skip to content

Commit 3def765

Browse files
MickaelBergemhaoqunjiang
authored andcommitted
fix(cli-plugin-unit-jest): also process SVG files with jest-transform-stub (#2368)
Avoids getting a Jest unexpected token exception when requiring SVG files in template.
1 parent c73d967 commit 3def765

File tree

1 file changed

+1
-1
lines changed
  • packages/@vue/cli-plugin-unit-jest/generator

1 file changed

+1
-1
lines changed

packages/@vue/cli-plugin-unit-jest/generator/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = (api, _, __, invoking) => {
2121
'transform': {
2222
// process *.vue files with vue-jest
2323
'^.+\\.vue$': 'vue-jest',
24-
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub'
24+
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub'
2525
},
2626
// support the same @ -> src alias mapping in source code
2727
'moduleNameMapper': {

0 commit comments

Comments
 (0)