Skip to content

Commit

Permalink
Removed random semi-colon in webpack README
Browse files Browse the repository at this point in the history
  • Loading branch information
smol-honk authored and gregberge committed Sep 12, 2021
1 parent fdb4a82 commit 87ca373
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion packages/webpack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ By default, `@svgr/webpack` includes a `babel-loader` with [an optimized configu
It is possible to detect the module that requires your SVG using [`Rule.issuer`](https://webpack.js.org/configuration/module/#ruleissuer) in Webpack 5. Using it you can specify two different configurations for JavaScript and the rest of your files.

```js
;[
[
{
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
issuer: /\.[jt]sx?$/,
Expand Down
54 changes: 27 additions & 27 deletions packages/webpack/src/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,26 @@ export default SvgIcon;"
`;

exports[`webpack loader should convert file (typescript: true) 1`] = `
"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
"var _g;
import * as React from \\"react\\";
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _ref = /*#__PURE__*/React.createElement(\\"g\\", {
stroke: \\"#063855\\",
strokeWidth: 2,
fill: \\"none\\",
fillRule: \\"evenodd\\",
strokeLinecap: \\"square\\"
}, /*#__PURE__*/React.createElement(\\"path\\", {
d: \\"M51 37L37 51M51 51L37 37\\"
}));
import * as React from \\"react\\";
function SvgIcon(props) {
return /*#__PURE__*/React.createElement(\\"svg\\", _extends({
width: 88,
height: 88,
xmlns: \\"http://www.w3.org/2000/svg\\"
}, props), _ref);
}, props), _g || (_g = /*#__PURE__*/React.createElement(\\"g\\", {
stroke: \\"#063855\\",
strokeWidth: 2,
fill: \\"none\\",
fillRule: \\"evenodd\\",
strokeLinecap: \\"square\\"
}, /*#__PURE__*/React.createElement(\\"path\\", {
d: \\"M51 37 37 51M51 51 37 37\\"
}))));
}
export default SvgIcon;"
Expand Down Expand Up @@ -73,24 +73,24 @@ export default SvgIcon;"
`;

exports[`webpack loader should convert file 2`] = `
"import * as React from \\"react\\";
"var _svg;
var _ref = /*#__PURE__*/React.createElement(\\"svg\\", {
width: 88,
height: 88,
xmlns: \\"http://www.w3.org/2000/svg\\"
}, /*#__PURE__*/React.createElement(\\"g\\", {
stroke: \\"#063855\\",
strokeWidth: 2,
fill: \\"none\\",
fillRule: \\"evenodd\\",
strokeLinecap: \\"square\\"
}, /*#__PURE__*/React.createElement(\\"path\\", {
d: \\"M51 37L37 51M51 51L37 37\\"
})));
import * as React from \\"react\\";
function SvgIcon() {
return _ref;
return _svg || (_svg = /*#__PURE__*/React.createElement(\\"svg\\", {
width: 88,
height: 88,
xmlns: \\"http://www.w3.org/2000/svg\\"
}, /*#__PURE__*/React.createElement(\\"g\\", {
stroke: \\"#063855\\",
strokeWidth: 2,
fill: \\"none\\",
fillRule: \\"evenodd\\",
strokeLinecap: \\"square\\"
}, /*#__PURE__*/React.createElement(\\"path\\", {
d: \\"M51 37 37 51M51 51 37 37\\"
}))));
}
export default SvgIcon;"
Expand Down

0 comments on commit 87ca373

Please sign in to comment.