improve file structure + add TSX/JSX support
All checks were successful
/ test (push) Successful in 14s
All checks were successful
/ test (push) Successful in 14s
This commit is contained in:
parent
013c7cef7f
commit
a7aaff537f
13 changed files with 67 additions and 48 deletions
|
|
@ -20,12 +20,18 @@ export default class TSCompiler extends Plugin {
|
|||
const result = await esbuild.build({
|
||||
stdin: {
|
||||
contents: file,
|
||||
resolveDir: filePath.split("/")?.slice(0,-1).join("/"),
|
||||
sourcefile: filePath.split("/").at(-1),
|
||||
loader: "ts"
|
||||
loader: filePath.split("/").at(-1)?.split(".").at(-1) as "ts"|"tsx"|"jsx"
|
||||
},
|
||||
jsxFragment: "Fragment",
|
||||
jsxFactory: "Nano.h",
|
||||
jsxImportSource: "nano-jsx",
|
||||
jsx: "transform",
|
||||
write: false,
|
||||
bundle: true,
|
||||
outdir: 'out',
|
||||
minify: this.minify
|
||||
minify: this.minify,
|
||||
});
|
||||
|
||||
if(result.errors.length != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue