jsoneditor-react
jsoneditor-react copied to clipboard
Icons are not rendered.
Icons are not visible in the editor. Issue reproduced in codesandbx. https://codesandbox.io/s/infallible-smoke-lvcvo?fontsize=14&hidenavigation=1&theme=dark
do u using CRA ? may be this is relevant to jsoneditor itself.. for webpack build u need appropriated loaders check this issue https://github.com/vankop/jsoneditor-react/issues/16
I'm using React in Meteor app. Bundled using using default meteor bundler.
is there any update regarding this issue ?
I think it is a problem upstream or in your webpack config.. You could check storybook https://github.com/vankop/jsoneditor-react/tree/master/stories all staff works..
In provided example svg with icons loads, so probably you need to create issue in jsoneditor itself https://github.com/josdejong/jsoneditor/issues
In provided example svg with icons loads, so probably you need to create issue in jsoneditor itself https://github.com/josdejong/jsoneditor/issues
I cant see icons loaded in provided example too, neither in my app
https://codesandbox.io/s/infallible-smoke-lvcvo?fontsize=14&hidenavigation=1&theme=dark

Working to find a fix for this. Its one of those straight forward gotchas, must be
So it is indeed a webpack configuration issue. In my case I was using image-webpack-loader. But as soon as I changed my webpack config to use the following (begrudgingly), svgs and images are now loaded. Also ensure your Sass config is using resolve-url-loader and source map is enabled.
{
test: /\.(png|jpg|gif|svg)$/,
type: 'asset/resource',
}
I removed the config from webpack config from module.rules, and it worked
Looks like the css loader toke care of it.
{ test: /\.css$/, use: ['style-loader', 'css-loader'] }