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

how to use jquery.json-viewer in react #15

Closed
mwb-27 opened this issue Aug 18, 2019 · 3 comments
Closed

how to use jquery.json-viewer in react #15

mwb-27 opened this issue Aug 18, 2019 · 3 comments
Labels

Comments

@mwb-27
Copy link

mwb-27 commented Aug 18, 2019

how to use jquery.json-viewer in react.
import xx from 'jquery.json-viewer'?

@abodelot
Copy link
Owner

Hi,

This jquery plugin is written ES5, there is no module or import system.

You must include the sources in your HTML document:

<html>
  <head>
    ...
    <script src="json-viewer/jquery.json-viewer.js"></script>
    <link href="json-viewer/jquery.json-viewer.css" type="text/css" rel="stylesheet">
  </head>

You need to make sure jQuery is also included in your HTML document.

@seyfer
Copy link

seyfer commented Sep 20, 2019

Isn't it relatively easy to add some integration with module or import?

@seyfer
Copy link

seyfer commented Sep 20, 2019

@mwb-27 I made it connected to ES6 with webpack and scss in this way

js:
import 'jquery.json-viewer/json-viewer/jquery.json-viewer';
scss:
@import "~jquery.json-viewer/json-viewer/jquery.json-viewer.css";

@mwb-27 mwb-27 closed this as completed Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants