<!-- Love SVGR? Please consider supporting our collective: ๐ https://opencollective.com/svgr/donate --> ## ๐ Feature Proposal Support ESM templates. Error when loading "--template": svgr-template.mjs ``` Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/karl/development/neo4j/needle-2/packages/react/svgr-template.mjs not supported. Instead change the require of /Users/karl/development/neo4j/needle-2/packages/react/svgr-template.mjs to a dynamic import() which is available in all CommonJS modules. at Option.parseArg (/Users/karl/development/neo4j/needle-2/node_modules/@svgr/cli/dist/index.js:330:22) at handleOptionValue (/Users/karl/development/neo4j/needle-2/node_modules/@svgr/cli/node_modules/commander/lib/command.js:539:24) at Command.<anonymous> (/Users/karl/development/neo4j/needle-2/node_modules/@svgr/cli/node_modules/commander/lib/command.js:566:7) at Command.emit (node:events:514:28) at Command.parseOptions (/Users/karl/development/neo4j/needle-2/node_modules/@svgr/cli/node_modules/commander/lib/command.js:1454:18) at Command._parseCommand (/Users/karl/development/neo4j/needle-2/node_modules/@svgr/cli/node_modules/commander/lib/command.js:1240:25) at Command.parse (/Users/karl/development/neo4j/needle-2/node_modules/@svgr/cli/node_modules/commander/lib/command.js:909:10) at Object.<anonymous> (/Users/karl/development/neo4j/needle-2/node_modules/@svgr/cli/dist/index.js:398:19) at Object.<anonymous> (/Users/karl/development/neo4j/needle-2/node_modules/@svgr/cli/bin/svgr:3:1) ``` Currently the docs do show to use CJS: https://react-svgr.com/docs/custom-templates/#custom-index-template ## Motivation The future of JS is ESM, we should be moving away from CJS everywhere. ## Example Everything re-written from CJS to ESM. ## Pitch Less pain having to deal with CJS. Slightly related to https://github.com/gregberge/svgr/issues/707 Is this on the roadmap?
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by basickarl and has received 0 comments.