Skip to content

Commit

Permalink
chore(prettier): fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Mar 14, 2023
1 parent 86bb86f commit ce55cc0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,10 @@ describe('plugin', () => {
it('allows to specify a custom "classic" jsxRuntime using "defaultSpecifier"', () => {
const { code } = testPlugin(language)('<svg><g /></svg>', {
jsxRuntime: 'classic',
jsxRuntimeImport: { defaultSpecifier: 'h', source: 'hyperapp-jsx-pragma' },
jsxRuntimeImport: {
defaultSpecifier: 'h',
source: 'hyperapp-jsx-pragma',
},
})
expect(code).toMatchSnapshot()
})
Expand Down
14 changes: 7 additions & 7 deletions website/pages/docs/next.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ module.exports = {
webpack(config) {
// Grab the existing rule that handles SVG imports
const fileLoaderRule = config.module.rules.find((rule) =>
rule.test?.test?.(".svg")
);
rule.test?.test?.('.svg'),
)

config.module.rules.push(
// Reapply the existing rule, but only for svg imports ending in ?url
Expand All @@ -45,18 +45,18 @@ module.exports = {
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
resourceQuery: { not: /url/ }, // exclude if *.svg?url
use: ["@svgr/webpack"],
use: ['@svgr/webpack'],
},
);
)

// Modify the file loader rule to ignore *.svg, since we have it handled now.
fileLoaderRule.exclude = /\.svg$/i;
fileLoaderRule.exclude = /\.svg$/i

return config;
return config
},

// ...other config
};
}
```
**Your code**
Expand Down

1 comment on commit ce55cc0

@vercel
Copy link

@vercel vercel bot commented on ce55cc0 Mar 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

svgr – ./

svgr-gregberge.vercel.app
svgr-git-main-gregberge.vercel.app
api.react-svgr.com

Please sign in to comment.