From 3f879f384c39887dc21e359cee9aaa8abdd39079 Mon Sep 17 00:00:00 2001 From: Rahul Kadyan Date: Wed, 20 Feb 2019 20:56:15 +0530 Subject: [PATCH] fix: Add needMap option to disable source maps --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 83dbd6b..ff2863f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -158,7 +158,7 @@ export interface VuePluginOptions { /** * Rollup plugin for handling .vue files. */ -export default function vue(opts: VuePluginOptions = {}): Plugin { +export default function vue(opts: Partial = {}): Plugin { const isVue = createVueFilter(opts.include, opts.exclude) const isProduction = opts.template && typeof opts.template.isProduction === 'boolean' @@ -324,7 +324,7 @@ export default function vue(opts: VuePluginOptions = {}): Plugin { compiler: opts.compiler || templateCompiler, compilerParseOptions: opts.compilerParseOptions, sourceRoot: opts.sourceRoot, - needMap: true + needMap: 'needMap' in opts ? (opts as any).needMap : true }) ) )