fix wasm url prod (#2145)

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-04-16 22:23:15 -07:00
committed by GitHub
parent ff482e5f9b
commit 4abb8fc267
3 changed files with 11 additions and 23 deletions

View File

@ -21,6 +21,7 @@ import {
CopilotWorkerOptions,
LspWorker,
} from 'editor/plugins/lsp/types'
import { wasmUrl } from 'lang/wasm'
const DEFAULT_FILE_NAME: string = 'main.kcl'
@ -99,6 +100,7 @@ export const LspProvider = ({ children }: { children: React.ReactNode }) => {
const lspWorker = new Worker({ name: 'kcl' })
const initEvent: KclWorkerOptions = {
wasmUrl: wasmUrl(),
token: token,
baseUnit: defaultUnit.current,
devMode: DEV,
@ -173,6 +175,7 @@ export const LspProvider = ({ children }: { children: React.ReactNode }) => {
const lspWorker = new Worker({ name: 'copilot' })
const initEvent: CopilotWorkerOptions = {
wasmUrl: wasmUrl(),
token: token,
devMode: DEV,
}