tradingview / charting-library-examples

Examples of Charting Library integrations with other libraries, frameworks and data transports
MIT License
1.4k stars 763 forks source link

Example of a React App on a CDN #202

Open michaelkk opened 3 years ago

michaelkk commented 3 years ago

Hey everyone! I'm wondering regarding hosting charting library on some static server (like CDN).

I wrote my app using create-react-app template as in the example. And wanted to server static files somewhere on another subdomain (it's quite easy customising PUBLIC_URL). I tried to set library_path to the same CDN url, but faced with the problem that charting library doesn't work. There's an explanation why it's and they offered to create an iframe. However with the most common template create-react-app this is a bit tricky.

I think it will be very useful if there's an example showing how to do this in an awesome way using React. Probably, supporting this feature inside charting_library would be the most perfect way.

Thank you in advance for any ideas.

GarageInc commented 3 years ago

Same problem, waiting solution :(

kalexandrov commented 2 years ago

Anyone managed to do a workaround in React with this?