How to render the bundled js files inline #15179
Unanswered
AntonioLok
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone. We currently serve the static files built from
build-storybook
on artifactory.My company recently upgraded artifactory to the latest version. The latest version of artifactory includes some security changes which prevent loading external javascript files on the main html file (ie. it will not load any of the blunded js files). This sever setting cannot be changed.
The error is as follow:
Blocked script execution in '${url}/storybook/main/index.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
The solution that I came with was to use inline javascript. I was wondering if anyone has been able to do something similar or if someone could please guide me. I have created a
main.js
file inside.storybook
to override the default webpack settings. I have tried this plugin and some others but I cannot get it to work.This is what my
main.js
look like:Beta Was this translation helpful? Give feedback.
All reactions