-
-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Closed
Description
Hi there!
So I'm having the following situation:
I created an app using create-react-app (this repo), which has some assets.
The app is used to work as a plugin on many different sites/apps.
So the purpose is to provide it in 2 possible ways:
- Use inside an iframe and pass parameters via the URL
<iframe src="https://plugin.domain.com/plugin-name/version-number?param1=value1¶m2=value2"></iframe>- Use a
divwith the correctidand a separate<script>tag that points to the script (which is duplicated fromstatic/js/main.*.jstomain.jsin the root) and pass params via thedataset
<div id="plugin-name" data-param1="value1" data-param2="value2"></div>
<script type="text/javascript" src="https://plugin.domain.com/plugin-name/version-number/main.js"></script>When using the iframe, everything works like expected. But when using the div + script, I get the following error:
Failed to load resource: the server responded with a status of 404 (Not Found)Any idea how I can fix this or what the preferred way of doing something like this is?
Metadata
Metadata
Assignees
Labels
No labels