File tree 2 files changed +11
-8
lines changed
packages/babel-plugin-transform-svg-component/src 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,10 @@ describe('plugin', () => {
341
341
it ( 'allows to specify a custom "classic" jsxRuntime using "defaultSpecifier"' , ( ) => {
342
342
const { code } = testPlugin ( language ) ( '<svg><g /></svg>' , {
343
343
jsxRuntime : 'classic' ,
344
- jsxRuntimeImport : { defaultSpecifier : 'h' , source : 'hyperapp-jsx-pragma' } ,
344
+ jsxRuntimeImport : {
345
+ defaultSpecifier : 'h' ,
346
+ source : 'hyperapp-jsx-pragma' ,
347
+ } ,
345
348
} )
346
349
expect ( code ) . toMatchSnapshot ( )
347
350
} )
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ module.exports = {
30
30
webpack (config ) {
31
31
// Grab the existing rule that handles SVG imports
32
32
const fileLoaderRule = config .module .rules .find ((rule ) =>
33
- rule .test ? .test ? .(" .svg" )
34
- );
33
+ rule .test ? .test ? .(' .svg' ),
34
+ )
35
35
36
36
config .module .rules .push (
37
37
// Reapply the existing rule, but only for svg imports ending in ?url
@@ -45,18 +45,18 @@ module.exports = {
45
45
test: / \. svg$ / i ,
46
46
issuer: / \. [jt] sx? $ / ,
47
47
resourceQuery: { not: / url/ }, // exclude if *.svg?url
48
- use: [" @svgr/webpack" ],
48
+ use: [' @svgr/webpack' ],
49
49
},
50
- );
50
+ )
51
51
52
52
// Modify the file loader rule to ignore *.svg, since we have it handled now.
53
- fileLoaderRule .exclude = / \. svg$ / i ;
53
+ fileLoaderRule .exclude = / \. svg$ / i
54
54
55
- return config;
55
+ return config
56
56
},
57
57
58
58
// ...other config
59
- };
59
+ }
60
60
` ` `
61
61
62
62
**Your code**
You can’t perform that action at this time.
0 commit comments