We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While using react-template, importing SVG throws an error:
Syntax Error: Error: Plugin name should be specified at Array.map (<anonymous>)
Version: "@pota/react-webpack-scripts": "~1.0.3"
"@pota/react-webpack-scripts": "~1.0.3"
Here is the diff that solved my problem:
diff --git a/node_modules/@pota/react-webpack-scripts/lib/config.js b/node_modules/@pota/react-webpack-scripts/lib/config.js index 0c9c06b..7dbc969 100644 --- a/node_modules/@pota/react-webpack-scripts/lib/config.js +++ b/node_modules/@pota/react-webpack-scripts/lib/config.js @@ -49,14 +49,22 @@ export class ReactWebpackConfig extends WebpackConfig { options: { prettier: false, svgoConfig: { - plugins: [{ removeViewBox: false }], + plugins: [ { + name: 'preset-default', + params: { + overrides: { + removeViewBox: false, + }, + }, + }], }, titleProp: true, ref: true, }, }, - { loader: 'url-loader' }, ], + issuer: /\.[jt]sx?$/, + resourceQuery: { not: [/url/] }, }; } }
The text was updated successfully, but these errors were encountered:
same issue
Sorry, something went wrong.
@sombrilla Were the issuer and resourceQuery also needed to fix this? If so, could you explain?
issuer
resourceQuery
The original issue looks like a breaking change that required a different config, so that looks good. But the other changes seem unrelated to that.
No branches or pull requests
While using react-template, importing SVG throws an error:
Syntax Error: Error: Plugin name should be specified at Array.map (<anonymous>)
Version:
"@pota/react-webpack-scripts": "~1.0.3"
Here is the diff that solved my problem:
The text was updated successfully, but these errors were encountered: