Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

SSR optimization logic on runtime. #71

Open
@serkanyersen

Description

@serkanyersen

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 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.

Thank you for great work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions