Failed to execute 'createElement' on 'Document': The tag name provided ('static/media/arrow-right.981294d1.svg') is not a valid name.
See original GitHub issueI have error in storybook when config svgr webpack for project.
This is my config
const path = require('path');
module.exports = async ({ config }) => {
config.module.rules.push(
{
test: /\.less$/,
use: [
'style-loader',
'css-loader',
{
loader: 'less-loader',
options: {
javascriptEnabled: true,
},
},
],
include: path.resolve(__dirname, '../'),
},
{
test: /\.svg$/,
use: [
{
loader: '@svgr/webpack',
options: {
icon: true,
},
},
],
}
);
config.resolve.extensions.push('.js', '.jsx', '.svg');
config.resolve.modules.push(path.resolve('.'));
return config;
};
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Failed to execute 'createElement' on 'Document': The tag ...
ts') is not a valid name. What does this error even mean? It looks like it doesn't like the typescript extension. Any ideas...
Read more >Failed to execute 'createElement' on 'Document': The tag ...
I am getting the error: "DOMException: Failed to execute 'createElement' on 'Document': The tag name provided is not a valid name".
Read more >Failed to execute 'createElement' on 'Document' error message
Failed to execute 'createElement' on 'Document': The tag name provided ('core/location') is not a valid name. in core/location in div in withData(a) in...
Read more >Error: Failed to execute "createElement" on "Document"
Error : Failed to execute "createElement" on "Document": The tag name provided is not a valid name. January 18, 2022 ...
Read more >Failed To Execute 'Createelement' On 'Document': The Tag ...
Failed to execute 'createElement' on 'Document': The tag name provided is not a valid name #197. I'm trying to have reactsvgloader 2.1.0 to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This solution worked for me: https://stackoverflow.com/a/61706308/10331102
add the following to yours storybook’s webpackFinal config:
Just ran into this with a Preact project.
solution was the same as was posted by @GR34SE but with a different loader