From eb68108b675d5ab3d995c40a064477038af4e416 Mon Sep 17 00:00:00 2001 From: Ritesh Kumar Date: Fri, 19 Jul 2019 11:51:51 +0530 Subject: [PATCH] make monaco workers available in static folder (#106) * fixes * make monaco workers available in static folder * fixes * fixes * fix(worker): monaco workers path --- components/EditorPanel.tsx | 4 +--- components/Monaco.tsx | 21 +++++++++++++++++++++ package.json | 2 +- pages/_app.tsx | 2 +- pages/_document.tsx | 35 ++++++++++++----------------------- 5 files changed, 36 insertions(+), 28 deletions(-) diff --git a/components/EditorPanel.tsx b/components/EditorPanel.tsx index 785bb9f..ea07a08 100644 --- a/components/EditorPanel.tsx +++ b/components/EditorPanel.tsx @@ -107,7 +107,7 @@ export default function({ useEffect(() => { // @ts-ignore - window.__webpack_public_path__ = "/static/"; + window.__webpack_public_path__ = "/_next/static/"; }, []); const getSettings = useCallback( @@ -182,8 +182,6 @@ export default function({ setValue(defaultValue); }, [defaultValue]); - console.log(showPreview); - return ( { @@ -69,6 +53,11 @@ export default class MyDocument extends Document {
{hydrationScript} + +