File tree Expand file tree Collapse file tree 3 files changed +69
-413
lines changed Expand file tree Collapse file tree 3 files changed +69
-413
lines changed Original file line number Diff line number Diff line change 11/// <reference lib="deno.ns" />
22import * as esbuild from '@esbuild' ;
3- import { solidPlugin as esbuildPluginSolidJs } from '@ esbuild-plugin-solid' ;
3+ import { denoPlugin as esbuildPluginDeno } from "@deno/ esbuild-plugin" ;
44import { green } from '@std/fmt/colors' ;
55import { parseArgs } from '@std/cli/parse-args' ;
66
7- import denoJson from '../deno.json' with { type : 'json' }
8-
97const args = parseArgs < {
108 watch : boolean | undefined ,
119 develop : boolean | undefined ,
@@ -53,6 +51,9 @@ const filesConfig : esbuild.BuildOptions = {
5351 bundle : true ,
5452 format : 'esm' ,
5553 target : 'esnext' ,
54+ platform : 'browser' ,
55+ jsx : 'automatic' ,
56+ jsxImportSource : '@solid-js/h' ,
5657 sourcemap : args . develop ? 'linked' : false ,
5758 sourcesContent : true ,
5859 outdir : './dist' ,
@@ -65,9 +66,11 @@ const filesConfig : esbuild.BuildOptions = {
6566 'nesting' : true
6667 } ,
6768 plugins : [
68- esbuildPluginSolidJs ( { solid : { moduleName : '@solid-js/web' } } )
69- ] ,
70- alias : denoJson . imports
69+ esbuildPluginDeno ( {
70+ preserveJsx : true ,
71+ debug : args . develop ?? false
72+ } ) ,
73+ ]
7174}
7275
7376console . log ( 'Build process started.' ) ;
Original file line number Diff line number Diff line change 107107 }
108108 },
109109 "imports" : {
110+ "@deno/esbuild-plugin" : " jsr:@deno/esbuild-plugin@^1.2.0" ,
110111 "@esbuild" : " npm:esbuild@^0.25.11" ,
111- "@esbuild-plugin-solid" : " npm:esbuild-plugin-solid@^0.6.0" ,
112- "@solid-js" :
" https://esm.sh/[email protected] " ,
113- "@solid-js/jsx-runtime" :
" https://esm.sh/[email protected] /jsx-runtime" ,
114- "@solid-js/web" :
" https://esm.sh/[email protected] /web" ,
115- "@std/cli/parse-args" : " jsr:@std/cli@^1.0.6/parse-args" ,
116- "@std/http/unstable-route" : " jsr:@std/http@^1.0.6/unstable-route" ,
117- "@std/http/file-server" : " jsr:@std/http@^1.0.6/file-server" ,
118- "@std/fmt/colors" : " jsr:@std/fmt@^1.0.2/colors"
112+ "@solid-js" :
" npm:[email protected] " ,
113+ "@std/cli" : " jsr:@std/cli@^1.0.6" ,
114+ "@std/http" : " jsr:@std/http@^1.0.6" ,
115+ "@std/fmt" : " jsr:@std/fmt@^1.0.2"
119116 }
120117}
You can’t perform that action at this time.
0 commit comments