You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, since the version 6 update I'm facing the following issue:
This error is being raised when used with rollup, since version 6, following the Rollup and @rollup/plugin-urldocumentation
[!] Error: 'default' is not exported by cart.svg, imported by index.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
index.js (1:7)
1: import cartUrl, { ReactComponent as Cart } from './cart.svg';
^
2:
3: export { cartUrl, Cart };
Error: 'default' is not exported by cart.svg, imported by index.js
at error (/home/pierredo/Dev/svg-import-named/node_modules/rollup/dist/shared/rollup.js:158:30)
at Module.error (/home/pierredo/Dev/svg-import-named/node_modules/rollup/dist/shared/rollup.js:12382:16)
at Module.traceVariable (/home/pierredo/Dev/svg-import-named/node_modules/rollup/dist/shared/rollup.js:12767:29)
at Module.getVariableForExportName (/home/pierredo/Dev/svg-import-named/node_modules/rollup/dist/shared/rollup.js:12558:35)
at Module.includeAllExports (/home/pierredo/Dev/svg-import-named/node_modules/rollup/dist/shared/rollup.js:12612:39)
at Graph.includeStatements (/home/pierredo/Dev/svg-import-named/node_modules/rollup/dist/shared/rollup.js:22901:36)
at Graph.build (/home/pierredo/Dev/svg-import-named/node_modules/rollup/dist/shared/rollup.js:22816:14)
at async rollupInternal (/home/pierredo/Dev/svg-import-named/node_modules/rollup/dist/shared/rollup.js:23423:9)
at async build (/home/pierredo/Dev/svg-import-named/node_modules/rollup/dist/bin/rollup:1546:20)
at async runRollup (/home/pierredo/Dev/svg-import-named/node_modules/rollup/dist/bin/rollup:1730:21)
Hey @Pierre-Do 👋,
Thank you for opening an issue. We'll get back to you as soon as we can.
Please, consider supporting us on Open Collective. We give a special attention to issues opened by backers.
If you use SVGR at work, you can also ask your company to sponsor us ❤️.
🐛 Bug Report
Hey, since the version 6 update I'm facing the following issue:
This error is being raised when used with
rollup
, since version 6, following the Rollup and@rollup/plugin-url
documentationTo Reproduce
@svgr/rollup
v6rollup -c
Specifying
exportType: 'named'
as an option doesn't change anything.Works as expected with
"@svgr/rollup": "^5.0.0",
. Breaks with"@svgr/rollup": "^6.0.0",
Expected behavior
The bundle should be generated the same way it was with version 5.
Link to repl or repo (highly encouraged)
https://github.com/Pierre-Do/svg-import-named
Run
npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard
The text was updated successfully, but these errors were encountered: