I'm currently using vue-component-compiler on a custom bundler I wrote. We have an internal Vue component library and we need to bundle each component separately instead of bundling everything into a single file.
I got everything else working but I'm having trouble with the SSR optimizations. As far as I understand I can only compile for SSR or CLIENT but not both at the same time.
Would it be possible to get a compiled component decide what to do on runtime? Right now SSR related pieces in the code just prints if(true). I feel like if I could get it to print if(process.env.VUE_ENV === 'server') instead, it might just work.
I'm also open to other suggestions for 1:1 mapping of .vue files to compiled .js versions.
Hi there.
I'm currently using vue-component-compiler on a custom bundler I wrote. We have an internal Vue component library and we need to bundle each component separately instead of bundling everything into a single file.
I got everything else working but I'm having trouble with the SSR optimizations. As far as I understand I can only compile for SSR or CLIENT but not both at the same time.
Would it be possible to get a compiled component decide what to do on runtime? Right now SSR related pieces in the code just prints
if(true)
. I feel like if I could get it to printif(process.env.VUE_ENV === 'server')
instead, it might just work.I'm also open to other suggestions for 1:1 mapping of
.vue
files to compiled.js
versions.Thank you for great work!