File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -157,11 +157,18 @@ export default class {
157157
158158 configBase . plugins = [ exportDefaultModulePath ]
159159
160- if ( this . options . babel === true ) {
161- configBase . plugins = [ jsdocBabelPath , ...configBase . plugins ]
162- } else if ( isObject ( this . options . babel ) ) {
163- configBase . plugins = [ jsdocBabelPath , ...configBase . plugins ]
164- configBase . babel = this . options . babel
160+ if ( this . options . babel ) {
161+ configBase . plugins . unshift ( jsdocBabelPath )
162+ const babelConfig = {
163+ cwd : compiler . context ,
164+ root : compiler . context ,
165+ comments : true ,
166+ env : {
167+ NODE_ENV : "development" ,
168+ } ,
169+ ...( isObject ( this . options . babel ) ? this . options . babel : undefined ) ,
170+ }
171+ configBase . babel = babelConfig
165172 }
166173
167174 if ( ! this . options . tsdOutputFile ) {
You can’t perform that action at this time.
0 commit comments