Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: airbnb/babel-plugin-inline-react-svg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: airbnb/babel-plugin-inline-react-svg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.1
Choose a head ref
  • 3 commits
  • 2 files changed
  • 3 contributors

Commits on Feb 22, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b8fb637 View commit details

Commits on Feb 23, 2021

  1. [Deps] update svgo

    ljharb committed Feb 23, 2021
    Copy the full SHA
    7471408 View commit details
  2. 2.0.1

    - [Fix] Fix crash when SVGO is turned off
    - [Deps] update `svgo`
    lencioni committed Feb 23, 2021
    Copy the full SHA
    d4525ce View commit details
Showing with 3 additions and 3 deletions.
  1. +2 −2 package.json
  2. +1 −1 src/index.js
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-inline-react-svg",
"version": "2.0.0",
"version": "2.0.1",
"description": "A babel plugin that optimizes and inlines SVGs for your react components.",
"main": "lib/index.js",
"scripts": {
@@ -50,7 +50,7 @@
"@babel/parser": "^7.0.0",
"lodash.isplainobject": "^4.0.6",
"resolve": "^1.20.0",
"svgo": "^2.0.0"
"svgo": "^2.0.3"
},
"engines": {
"node": ">=10.13"
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ export default declare(({
}
const rawSource = readFileSync(svgPath, 'utf8');
const optimizedSource = state.opts.svgo === false
? rawSource
? { data: rawSource }
: optimize(rawSource, state.opts.svgo);

const escapeSvgSource = escapeBraces(optimizedSource);