File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,16 @@ But if things are not working as expected you can configure esbuild-node-tsc by
109
109
Example ` etsc.config.js `
110
110
111
111
``` js
112
+ const esbuildPluginTsc = require (' esbuild-plugin-tsc' );
113
+
112
114
module .exports = {
113
115
outDir: " ./dist" ,
114
116
esbuild: {
115
117
minify: false ,
116
118
target: " es2015" ,
119
+ plugins: [
120
+ esbuildPluginTsc (),
121
+ ],
117
122
},
118
123
assets: {
119
124
baseDir: " src" ,
Original file line number Diff line number Diff line change
1
+ import type { Plugin } from 'esbuild'
2
+
1
3
export type Config = Partial < {
2
4
outDir : string ;
3
5
tsConfigFile ?: string ;
4
6
esbuild : {
5
7
entryPoints ?: string [ ] ;
6
8
minify ?: boolean ;
7
9
target ?: string ;
10
+ plugins ?: Plugin [ ]
8
11
} ;
9
12
assets : {
10
13
baseDir ?: string ;
Original file line number Diff line number Diff line change @@ -61,15 +61,16 @@ function getBuildMetadata(userConfig: Config) {
61
61
userConfig . esbuild ?. target ||
62
62
tsConfig ?. raw ?. compilerOptions ?. target ||
63
63
"es6" ;
64
-
65
64
const minify = userConfig . esbuild ?. minify || false ;
65
+ const plugins = userConfig . esbuild ?. plugins || [ ] ;
66
66
67
67
const esbuildOptions : BuildOptions = {
68
68
outdir : outDir ,
69
69
entryPoints : srcFiles ,
70
70
sourcemap,
71
71
target,
72
72
minify,
73
+ plugins,
73
74
tsconfig : tsConfigFile ,
74
75
} ;
75
76
You can’t perform that action at this time.
0 commit comments