This repository was archived by the owner on Jan 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -285,10 +285,9 @@ export default function VuePlugin(opts: VuePluginOptions = {}): Plugin {
285285 export default script
286286 // For security concerns, we use only base name in production mode. See https://github.com/vuejs/rollup-plugin-vue/issues/258
287287 script.__file = ${ isProduction ? JSON . stringify ( path . basename ( filename ) ) : JSON . stringify ( filename ) }
288- ` ,
289- map : { mappings : '' } ,
288+ `
290289 }
291- : { code : '' , map : { mappings : '' } }
290+ : { code : '' }
292291
293292 if ( shouldExtractCss ) {
294293 input . styles = input . styles
@@ -305,7 +304,7 @@ export default function VuePlugin(opts: VuePluginOptions = {}): Plugin {
305304 ) } '`
306305
307306 if ( style . module || descriptor . styles [ index ] . scoped ) {
308- return { ...style , code : '' , map : { mappings : '' } }
307+ return { ...style , code : '' , map : undefined }
309308 }
310309 } )
311310 . filter ( Boolean )
@@ -331,6 +330,8 @@ export default function VuePlugin(opts: VuePluginOptions = {}): Plugin {
331330
332331 dT ( `id: ${ filename } \ncode:\n${ result . code } \n\nmap:\n${ JSON . stringify ( result . map , null , 2 ) } \n` )
333332
333+ result . map = result . map || { mappings : '' }
334+
334335 return result
335336 }
336337 } ,
You can’t perform that action at this time.
0 commit comments