File tree 3 files changed +11
-4
lines changed
3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 64
64
"echarts" : " ^5.5.1" ,
65
65
"echarts-gl" : " ^2.0.9" ,
66
66
"echarts-liquidfill" : " ^3.1.0" ,
67
- "esbuild-wasm" : " ^0.19.12 " ,
67
+ "esbuild-wasm" : " ^0.23.0 " ,
68
68
"eslint" : " ^7.32.0" ,
69
69
"eslint-plugin-prettier" : " ^3.4.1" ,
70
70
"eslint-plugin-vue" : " ^8.7.1" ,
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import javascript from "highlight.js/lib/languages/javascript";
16
16
import typescript from " highlight.js/lib/languages/typescript" ;
17
17
import hljsVuePlugin from " @highlightjs/vue-plugin" ;
18
18
import { initialize , transform } from " esbuild-wasm" ;
19
+ import wasmURL from " esbuild-wasm/esbuild.wasm" ;
19
20
import { track } from " @vercel/analytics" ;
20
21
21
22
import { getImportsFromOption } from " ./utils/codegen" ;
@@ -75,9 +76,7 @@ const transformedCode = ref("");
75
76
const transformErrors = ref ([]);
76
77
77
78
onMounted (async () => {
78
- await initialize ({
79
- wasmURL: " https://cdn.jsdelivr.net/npm/[email protected] /esbuild.wasm"
80
- });
79
+ await initialize ({ wasmURL });
81
80
82
81
initializing .value = false ;
83
82
Original file line number Diff line number Diff line change @@ -20,6 +20,14 @@ export default {
20
20
. test ( / \. s v g $ / )
21
21
. type ( "asset/source" ) ;
22
22
23
+ config . module
24
+ . rule ( 'wasm' )
25
+ . test ( / \. w a s m $ / )
26
+ . type ( 'asset/resource' )
27
+ . set ( 'generator' , {
28
+ filename : '[name].[hash:8][ext]'
29
+ } )
30
+
23
31
config . plugin ( "define" ) . tap ( ( [ options ] ) => [
24
32
{
25
33
...options ,
You can’t perform that action at this time.
0 commit comments