Skip to content

Commit 557b150

Browse files
authored
fix: source map (#278)
1 parent a2134c6 commit 557b150

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/core/options.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ export function resolveOptions(options: Options, root: string): ResolvedOptions
5353
throw new Error('[unplugin-vue-components] `extensions` option is required to search for components')
5454
}
5555

56-
resolved.dts = !options.dts
56+
resolved.dts = !resolved.dts
5757
? false
5858
: resolve(
5959
root,
60-
typeof options.dts === 'string'
61-
? options.dts
60+
typeof resolved.dts === 'string'
61+
? resolved.dts
6262
: 'components.d.ts',
6363
)
6464
resolved.root = root

src/core/unplugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default createUnplugin<Options>((options = {}) => {
3636
vite: {
3737
configResolved(config) {
3838
ctx.setRoot(config.root)
39-
ctx.sourcemap = config.build.sourcemap
39+
ctx.sourcemap = true
4040

4141
if (config.plugins.find(i => i.name === 'vite-plugin-vue2'))
4242
ctx.setTransformer('vue2')

0 commit comments

Comments
 (0)