Skip to content

Commit

Permalink
fix double initialisation of esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
haikyuu committed Mar 17, 2023
1 parent 017c676 commit 6c8a20d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.imba
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ export def parseJS(source, options)
export def generate(ast, options)
new Builder(ast, options).get()

let esbuild
def strip-types(source)

let esbuild
# if $web$
# try
# esbuild = await import('esbuild-wasm')
# await esbuild.initialize(wasmURL: '../node_modules/esbuild-wasm/esbuild.wasm')
# catch err
# console.log err
# else
esbuild = await import('esbuild-wasm')
await esbuild.initialize({wasmURL: esbuildUrl})
unless esbuild
esbuild = await import('esbuild-wasm')
await esbuild.initialize({wasmURL: esbuildUrl})
const esbuild_options =
jsx: "preserve"
loader: "tsx"
Expand Down

0 comments on commit 6c8a20d

Please sign in to comment.