File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 6464 "echarts" : " ^5.5.1" ,
6565 "echarts-gl" : " ^2.0.9" ,
6666 "echarts-liquidfill" : " ^3.1.0" ,
67- "esbuild-wasm" : " ^0.19.12 " ,
67+ "esbuild-wasm" : " ^0.23.0 " ,
6868 "eslint" : " ^7.32.0" ,
6969 "eslint-plugin-prettier" : " ^3.4.1" ,
7070 "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";
1616import typescript from " highlight.js/lib/languages/typescript" ;
1717import hljsVuePlugin from " @highlightjs/vue-plugin" ;
1818import { initialize , transform } from " esbuild-wasm" ;
19+ import wasmURL from " esbuild-wasm/esbuild.wasm" ;
1920import { track } from " @vercel/analytics" ;
2021
2122import { getImportsFromOption } from " ./utils/codegen" ;
@@ -75,9 +76,7 @@ const transformedCode = ref("");
7576const transformErrors = ref ([]);
7677
7778onMounted (async () => {
78- await initialize ({
79- wasmURL: " https://cdn.jsdelivr.net/npm/esbuild-wasm@0.19.12/esbuild.wasm"
80- });
79+ await initialize ({ wasmURL });
8180
8281 initializing .value = false ;
8382
Original file line number Diff line number Diff line change @@ -20,6 +20,14 @@ export default {
2020 . test ( / \. s v g $ / )
2121 . type ( "asset/source" ) ;
2222
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+
2331 config . plugin ( "define" ) . tap ( ( [ options ] ) => [
2432 {
2533 ...options ,
You can’t perform that action at this time.
0 commit comments