Rollup-plugin-vue: Security and other concerns

Created on 15 Jul 2018  路  12Comments  路  Source: vuejs/rollup-plugin-vue

Thank you @znck for your good work.

version 4.3.1

The normalize script has some security concerns, the code component.__file = "/Users/[username]/path/to/component.vue" is rendering out sensitive information.

Beside that I don't see a way to get rid of the __vue_create_injector__ code.

Most helpful comment

It should just be disabled in production/minified code, like in vue-loader.

All 12 comments

Is it okay if the file path is relative to cwd?

PS @Akryum: will devtools' open in editor work if __file is relative to cwd?

For public projects that would be ok, for private ones still a concern. Could it be an optional setting?

It should just be disabled in production/minified code, like in vue-loader.

@znck, do you agree with @Akryum suggestion? It is going to be fixed?

On another similar note, if I am not exporting any classes, what is the __vue_create_injector__ used for?

__vue_create_injector__ is used to inject styles to page at runtime. I have a WIP branch to remove it but it's blocked on https://github.com/vuejs/vue/issues/8296. non-SSR solution is ready though.

I am compiling a library, for which I don't need anyting SSR or runtime related. Aiming for the cleanest possible output. If not possible to fix it soon, please make it optional.

Thanks @znck!

@znck, sorry to bother again. I just realized the SSR scripts are still present when processing vue files.

Maybe I missed something. I'll check again.

@znck, did you got the chance to check this?

@znck, seems I found the issue, reported at https://github.com/vuejs/vue-component-compiler/issues/77

Is there any workaround for this? My generated budnles have my path in them.. I've tried several things but I cannot get it to dissapear. (component.__file)

Was this page helpful?
0 / 5 - 0 ratings