Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icons are not rendered. #28

Open
rinturj84 opened this issue Feb 28, 2020 · 10 comments
Open

Icons are not rendered. #28

rinturj84 opened this issue Feb 28, 2020 · 10 comments

Comments

@rinturj84
Copy link

Icons are not visible in the editor.
Issue reproduced in codesandbx.
https://codesandbox.io/s/infallible-smoke-lvcvo?fontsize=14&hidenavigation=1&theme=dark

@vankop
Copy link
Owner

vankop commented Feb 28, 2020

do u using CRA ?
may be this is relevant to jsoneditor itself..
for webpack build u need appropriated loaders check this issue #16

@rinturj84
Copy link
Author

I'm using React in Meteor app. Bundled using using default meteor bundler.

@rinturj84
Copy link
Author

is there any update regarding this issue ?

@vankop
Copy link
Owner

vankop commented Mar 5, 2020

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..

@vankop
Copy link
Owner

vankop commented Mar 5, 2020

In provided example svg with icons loads, so probably you need to create issue in jsoneditor itself https://github.com/josdejong/jsoneditor/issues

@TrejGun
Copy link

TrejGun commented Dec 17, 2020

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
Screenshot 2020-12-17 at 16 36 24

@TheGitPanda
Copy link

Working to find a fix for this. Its one of those straight forward gotchas, must be

@TheGitPanda
Copy link

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',
}

@ypling
Copy link

ypling commented May 18, 2022

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'] }

@ng-aneesh
Copy link

Was this issue solved, I am facing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants