File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,7 @@ interface PluginConfig extends DtsGenerationOption {
2020 * @param options - Configuration options for DTS generation
2121 * @returns BunPlugin instance
2222 */
23- export function dts ( options : PluginConfig = {
24- root : './src' ,
25- outdir : './dist' ,
26- } ) : BunPlugin {
23+ export function dts ( options : PluginConfig = { } ) : BunPlugin {
2724 return {
2825 name : 'bun-plugin-dtsx' ,
2926
@@ -41,8 +38,8 @@ export function dts(options: PluginConfig = {
4138 * @returns Normalized configuration
4239 */
4340function normalizeConfig ( options : PluginConfig , build : PluginConfig [ 'build' ] ) : DtsGenerationOption {
44- const root = options . root || build ?. config . root
45- const outdir = options . outdir || build ?. config . outdir
41+ const root = options . root || options . build ?. config . root || build ?. config . root || './src'
42+ const outdir = options . outdir || options . build ?. config . outdir || build ?. config . outdir || './dist'
4643
4744 if ( ! root ) {
4845 throw new Error ( '[bun-plugin-dtsx] Root directory is required' )
You can’t perform that action at this time.
0 commit comments