Skip to content

Commit 365b67e

Browse files
authored
feat: add sourcemap configuration switch (#833)
1 parent f5a9e0c commit 365b67e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Diff for: src/core/context.ts

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export class Context {
3939
private rawOptions: Options,
4040
) {
4141
this.options = resolveOptions(rawOptions, this.root)
42+
this.sourcemap = rawOptions.sourcemap ?? true
4243
this.generateDeclaration = throttle(500, this._generateDeclaration.bind(this), { noLeading: false })
4344
this.setTransformer(this.options.transformer)
4445
}

Diff for: src/types.ts

+7
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,13 @@ export interface Options {
198198
* Vue version of project. It will detect automatically if not specified.
199199
*/
200200
version?: 2 | 2.7 | 3
201+
202+
/**
203+
* Generate sourcemap for the transformed code.
204+
*
205+
* @default true
206+
*/
207+
sourcemap?: boolean
201208
}
202209

203210
export type ResolvedOptions = Omit<

0 commit comments

Comments
 (0)