Skip to content

Commit e28b7ab

Browse files
committed
fix vuejs#258, Add link to enable production mode
1 parent 3fbc8eb commit e28b7ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ export default function VuePlugin(opts: VuePluginOptions = {}): Plugin {
283283
'script'
284284
)}'
285285
export default script
286+
// For security concerns, we use only base name in production mode. See https://github.com/vuejs/rollup-plugin-vue/issues/258
287+
script.__file = ${isProduction ? JSON.stringify(path.basename(filename)) : JSON.stringify(filename)}
286288
`,
287289
map: { mappings: '' },
288290
}

0 commit comments

Comments
 (0)