Closed FernandoGOT closed 6 years ago
@FernandoGOT Your issue has been closed because it does not conform to our issue requirements. Please provide a full reproduction test case. This would help a lot 👷 . A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!
Also, It sounds like an issue with your bundler. I would encourage you to open the issue on their side. It's unlikely we can do anything about it here.
Just leaving here the fix in case other people get the same problem.
The problem was a configuration in the loader of the webpack, I needed to change the loader from file
to url-loader?importLoaders=1&limit=100000
, here an example:
module: {
loaders: [{
test: /.js[x]?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'es2017', 'react'],
plugins: [
'transform-runtime',
'transform-decorators-legacy',
'transform-class-properties',
'transform-object-rest-spread',
'transform-async-to-generator'
]
}
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
}, {
test: /\.woff|.woff2|.ttf|.eot|.svg*.*$/,
loader: 'file'
}]
}
module: {
loaders: [{
test: /.js[x]?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'es2017', 'react'],
plugins: [
'transform-runtime',
'transform-decorators-legacy',
'transform-class-properties',
'transform-object-rest-spread',
'transform-async-to-generator'
]
}
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
}, {
test: /\.(woff|woff2|eot|ttf|svg)(\?.*$|$)/,
loader: 'url-loader?importLoaders=1&limit=100000'
}]
}
more details here: https://webpack.js.org/loaders/url-loader/
React crash or gives an error everytime I use an component that uses "material-ui/internal/svg-icons/"
Expected Behavior
For the svg icons to render and no more console's alerts
Current Behavior
When I use an select the "ArrowDropDown" component isn't rendering and I get a tag
<e272eaa2fa1e676de9b817a5fb3b752f.js>
or some other code.js. The html look like this:See the "e272eaa2fa1e676de9b817a5fb3b752f.js" tag, this is the problem. It generate the error:
Warning: The tag is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
I have this problem with everything that uses the files from "material-ui/internat/scv-icons/". After some debugging I found that this tag is returned from
var _ArrowDropDown = require('../internal/svg-icons/ArrowDropDown');
at "material-ui/Select/SelectInput".Steps to Reproduce (for bugs)
I was unable to reproduce it to the current moment
Context
I can't use any component that have an "svg-icons" in it
Your Environment