oc-server 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +8 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -119,7 +119,14 @@ async function getHtmlTemplate(appBlock, filePath = 'index.html') {
119
119
  if (!template.includes('</body>')) {
120
120
  throw new Error('If you use a custom html entry it has to have a closing body tag');
121
121
  }
122
- template = template.replace('</body>', `${appBlock({
122
+ template = template.replace('</body>', `<script>
123
+ if (!window.oc?.status) {
124
+ const script = document.createElement('script');
125
+ script.src = '/oc-client/client.js';
126
+ document.body.appendChild(script);
127
+ }
128
+ </script>
129
+ ${appBlock({
123
130
  name: pkg.name,
124
131
  version: pkg.version,
125
132
  entry: appEntry,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-server",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",