Skip to content

Commit

Permalink
fix: need to install plugin-jsx since svgr removed it
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomontalbano committed Feb 13, 2024
1 parent 3765c7c commit d0541f4
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/website/.figmaexportrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
require('../output-components-as-svgr')({
output: './output/svgr-octicons',
getSvgrConfig: () => ({
plugins: ['@svgr/plugin-jsx'],
template: ({ componentName, props, jsx, exports }, { tpl }) => tpl`
const ${componentName} = (${props}) => (${jsx});
${exports}
Expand Down Expand Up @@ -63,6 +64,7 @@ module.exports = {
require('../output-components-as-svgr')({
output: './output/svgr',
getSvgrConfig: () => ({
plugins: ['@svgr/plugin-jsx'],
template: ({ componentName, props, jsx, exports }, { tpl }) => tpl`
const ${componentName} = (${props}) => (${jsx});
${exports}
Expand Down
1 change: 1 addition & 0 deletions packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"sass": "~1.70.0"
},
"dependencies": {
"@svgr/plugin-jsx": "^8.1.0",
"next": "^13.5.6",
"prismjs": "^1.29.0",
"react": "^18.2.0",
Expand Down
36 changes: 34 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/types@npm:^7.22.15, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.8.3":
"@babel/types@npm:^7.21.3, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.8.3":
version: 7.23.9
resolution: "@babel/types@npm:7.23.9"
dependencies:
Expand Down Expand Up @@ -450,6 +450,7 @@ __metadata:
dependencies:
"@figma-export/cli": ^4.8.0-alpha.4
"@figma-export/utils": ^4.8.0-alpha.4
"@svgr/plugin-jsx": ^8.1.0
"@types/react": ^18.2.55
eslint-config-next: ^13.5.6
next: ^13.5.6
Expand Down Expand Up @@ -1686,6 +1687,30 @@ __metadata:
languageName: node
linkType: hard

"@svgr/hast-util-to-babel-ast@npm:8.0.0":
version: 8.0.0
resolution: "@svgr/hast-util-to-babel-ast@npm:8.0.0"
dependencies:
"@babel/types": ^7.21.3
entities: ^4.4.0
checksum: 88401281a38bbc7527e65ff5437970414391a86158ef4b4046c89764c156d2d39ecd7cce77be8a51994c9fb3249170cb1eb8b9128b62faaa81743ef6ed3534ab
languageName: node
linkType: hard

"@svgr/plugin-jsx@npm:^8.1.0":
version: 8.1.0
resolution: "@svgr/plugin-jsx@npm:8.1.0"
dependencies:
"@babel/core": ^7.21.3
"@svgr/babel-preset": 8.1.0
"@svgr/hast-util-to-babel-ast": 8.0.0
svg-parser: ^2.0.4
peerDependencies:
"@svgr/core": "*"
checksum: 0418a9780753d3544912ee2dad5d2cf8d12e1ba74df8053651b3886aeda54d5f0f7d2dece0af5e0d838332c4f139a57f0dabaa3ca1afa4d1a765efce6a7656f2
languageName: node
linkType: hard

"@swc/helpers@npm:0.5.2":
version: 0.5.2
resolution: "@swc/helpers@npm:0.5.2"
Expand Down Expand Up @@ -4251,7 +4276,7 @@ __metadata:
languageName: node
linkType: hard

"entities@npm:^4.2.0":
"entities@npm:^4.2.0, entities@npm:^4.4.0":
version: 4.5.0
resolution: "entities@npm:4.5.0"
checksum: 853f8ebd5b425d350bffa97dd6958143179a5938352ccae092c62d1267c4e392a039be1bae7d51b6e4ffad25f51f9617531fedf5237f15df302ccfb452cbf2d7
Expand Down Expand Up @@ -11071,6 +11096,13 @@ __metadata:
languageName: node
linkType: hard

"svg-parser@npm:^2.0.4":
version: 2.0.4
resolution: "svg-parser@npm:2.0.4"
checksum: b3de6653048212f2ae7afe4a423e04a76ec6d2d06e1bf7eacc618a7c5f7df7faa5105561c57b94579ec831fbbdbf5f190ba56a9205ff39ed13eabdf8ab086ddf
languageName: node
linkType: hard

"svgo@npm:~3.2.0":
version: 3.2.0
resolution: "svgo@npm:3.2.0"
Expand Down

0 comments on commit d0541f4

Please sign in to comment.