I have a theme that is live and has some 10-20 custom gutenberg blocks, Those blocks sometime have svg imported to them like so
import logo from './logo.svg'
Today when I was trying to work and compile the theme getting an error in the SVGR plugin that comes with wp-scripts
when ever I try to import any SVG to the block,
This worked fine 2 days ago.
Here is my package.json
file.
{
"name": "some-project",
"version": "1.0.0",
"description": "A project for...",
"main": "build/index.js",
"scripts": {
"build:scripts": "wp-scripts build",
"start-build": "wp-scripts start",
"lint:js": "wp-scripts lint-js",
"lint:js:src": "wp-scripts lint-js ./src"
},
"author": "",
"license": "UNLICENSED",
"repository": {},
"private": true,
"devDependencies": {
"@lottiefiles/lottie-player": "1.5.7",
"@popperjs/core": "2.11.5",
"@svgr/webpack": "^6.5.1",
"@wordpress/scripts": "^24.2.0",
"bootstrap": "5.1.3",
"eslint": "^8.34.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"flickity": "3.0.0",
"jquery": "3.6.0",
"lity": "2.4.1",
"lodash": "4.17.21",
"lodash.assign": "4.2.0",
"prettier": "2.7.1",
"typescript": "^4.7.4",
"url-loader": "^4.1.1"
},
"dependencies": {
"build": "^0.1.4",
"eslint-config-wordpress": "^2.0.0",
"wp-scripts": "^0.0.1-security"
}
}
Would love some help.
My