Skip to content

Commit 367bee2

Browse files
committedJan 29, 2019
fix: use sourceMap option
1 parent 5eed44d commit 367bee2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
 

‎src/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,11 @@ export class Bundler {
409409
.replace(/\[min\]/, minPlaceholder)
410410
.replace(/\[ext\]/, extPlaceholder),
411411
name: config.output.moduleName,
412-
banner
412+
banner,
413+
sourcemap:
414+
typeof config.output.sourceMap === 'boolean'
415+
? config.output.sourceMap
416+
: minify
413417
}
414418
}
415419
}

‎src/types.ts

+5
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ export interface ConfigOutput {
104104
* @default `true`
105105
*/
106106
extractCSS?: boolean
107+
/**
108+
* Generate source map
109+
* @default `true` for minified bundle, `false` otherwise
110+
*/
111+
sourceMap?: boolean
107112
}
108113

109114
export interface Config {

0 commit comments

Comments
 (0)
Please sign in to comment.