File tree Expand file tree Collapse file tree 5 files changed +19
-0
lines changed Expand file tree Collapse file tree 5 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import esbuild from 'esbuild';
33import esbuildSvelte from 'esbuild-svelte' ;
44import sveltePreprocess from 'svelte-preprocess' ;
55import { getBuildBanner } from 'build/buildBanner' ;
6+ import { nodeModulesPolyfillPlugin } from 'esbuild-plugins-node-modules-polyfill' ;
67
78const banner = getBuildBanner ( 'Release Build' , version => version ) ;
89
@@ -48,6 +49,13 @@ const build = await esbuild.build({
4849 return ! warning . filename ?. includes ( 'node_modules' ) ;
4950 } ,
5051 } ) ,
52+ nodeModulesPolyfillPlugin ( {
53+ modules : {
54+ fs : true ,
55+ path : true ,
56+ url : true ,
57+ } ,
58+ } ) ,
5159 ] ,
5260} ) ;
5361
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import esbuildSvelte from 'esbuild-svelte';
44import sveltePreprocess from 'svelte-preprocess' ;
55import manifest from '../../manifest.json' assert { type : 'json' } ;
66import { getBuildBanner } from 'build/buildBanner' ;
7+ import { nodeModulesPolyfillPlugin } from 'esbuild-plugins-node-modules-polyfill' ;
78
89const banner = getBuildBanner ( 'Dev Build' , _ => 'Dev Build' ) ;
910
@@ -59,6 +60,13 @@ const context = await esbuild.context({
5960 return ! warning . filename ?. includes ( 'node_modules' ) ;
6061 } ,
6162 } ) ,
63+ nodeModulesPolyfillPlugin ( {
64+ modules : {
65+ fs : true ,
66+ path : true ,
67+ url : true ,
68+ } ,
69+ } ) ,
6270 ] ,
6371} ) ;
6472
Original file line number Diff line number Diff line change 4242 "builtin-modules" : " ^3.3.0" ,
4343 "esbuild" : " ^0.20.2" ,
4444 "esbuild-plugin-copy-watch" : " ^2.1.0" ,
45+ "esbuild-plugins-node-modules-polyfill" : " ^1.6.3" ,
4546 "esbuild-svelte" : " ^0.8.0" ,
4647 "eslint" : " ^8.57.0" ,
4748 "eslint-plugin-import" : " ^2.29.1" ,
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ export default class ShikiPlugin extends Plugin {
6969 }
7070 } ) ,
7171 ) ;
72+
73+ await loadPrism ( ) ;
7274 }
7375
7476 async loadLanguages ( ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments