You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: containers/widget-server/README.md
+5-9Lines changed: 5 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -16,14 +16,9 @@ The container has the following features:
16
16
17
17
## Usage
18
18
19
-
This container works best with widgets that are build in the latest Create React App (CRA) version (we recommend `>=5.0.0`).
20
-
21
19
### Preparations
22
20
23
-
1. Make sure your application doesn't rely on `unsafe-inline`.
24
-
CRA provides the [`INLINE_RUNTIME_CHUNK=false` option](https://create-react-app.dev/docs/advanced-configuration/) to make it compatible with the environment.
25
-
26
-
2. Add `<!--#echo var="__INJECT_SCRIPT_TAG__" encoding="none"-->` before the `</head>` tag in your `index.html`:
21
+
1. Add `<!--#echo var="__INJECT_SCRIPT_TAG__" encoding="none"-->` before the `</head>` tag in your `index.html`:
27
22
28
23
```diff
29
24
<html>
@@ -37,9 +32,10 @@ This container works best with widgets that are build in the latest Create React
37
32
</html>
38
33
```
39
34
40
-
3. Make sure that your build artifacts are in the `static/` folder of your build directory have a `hash` in its name. This is the default for CRA.
35
+
2. Depending on the libraries in use it may be necessary to pass the CSP nonce to them.
36
+
See the [example widget's index page](../../example-widget-mui/index.html) setting it up for webpack.
41
37
42
-
4. Create a new Dockerfile in your repository:
38
+
3. Create a new Dockerfile in your repository:
43
39
44
40
```Dockerfile
45
41
# Use the latest version of the base image
@@ -66,7 +62,7 @@ This container works best with widgets that are build in the latest Create React
66
62
67
63
### Build your image
68
64
69
-
1. Create a production build of your widget (`npm run build` / `yarn build` in CRA).
65
+
1. Create a production build of your widget: `yarn build`.
0 commit comments