Fix build version of the project because of web workers
This commit is contained in:
parent
2945febd91
commit
c7bc77b08f
4 changed files with 4 additions and 5 deletions
|
@ -3,7 +3,6 @@ import { IConfiguration } from '../../Interfaces/IConfiguration';
|
|||
import { getCircularReplacer } from '../../utils/saveload';
|
||||
import { ID } from '../SVG/SVG';
|
||||
import { IEditorState } from '../../Interfaces/IEditorState';
|
||||
import Worker from '../../workers/worker?worker';
|
||||
|
||||
export function SaveEditorAsJSON(
|
||||
history: IHistoryState[],
|
||||
|
@ -21,7 +20,7 @@ export function SaveEditorAsJSON(
|
|||
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
||||
if (window.Worker) {
|
||||
// use webworker for the stringify to avoid freezing
|
||||
const myWorker = new Worker();
|
||||
const myWorker = new Worker('workers/worker.js');
|
||||
myWorker.postMessage({ editorState, spaces });
|
||||
myWorker.onmessage = (event) => {
|
||||
const data = event.data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue