@tailor-cms/tce-preview-runtime 0.4.0-beta.1 → 0.4.0-beta.2
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.
- package/package.json +1 -1
- package/src/App.vue +2 -1
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -8,7 +8,8 @@ import MainLayout from './components/MainLayout.vue';
|
|
|
8
8
|
const appUrl = new URL(window.location.href);
|
|
9
9
|
const apiPrefix = '/tce-server';
|
|
10
10
|
const api = ky.create({ prefixUrl: apiPrefix });
|
|
11
|
-
const
|
|
11
|
+
const wsProtocol = appUrl.protocol === 'http:' ? 'ws:' : 'wss:';
|
|
12
|
+
const ws = new WebSocket(`${wsProtocol}//${appUrl.host}${apiPrefix}`);
|
|
12
13
|
|
|
13
14
|
const element = ref({});
|
|
14
15
|
onMounted(async () => {
|