Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VueSSRServerPlugin only #246

Open
jasonjiflyer opened this issue May 5, 2019 · 3 comments
Open

VueSSRServerPlugin only #246

jasonjiflyer opened this issue May 5, 2019 · 3 comments

Comments

@jasonjiflyer
Copy link

jasonjiflyer commented May 5, 2019

I noticed when I added VueSSRServerPlugin to webpack, only a json file was generated,my server.js disappeared.
So should I run webpack twice?the first time it generates a json file, and the second time it generates server.js file?
It looks not convenient.

Thanks for you help in advance!

@RossComputerGuy
Copy link

I'm having this same problem except for the server file never generates unless I remove the plugin from my webpack config

@RossComputerGuy
Copy link

Solution for the devs:

In this part of the code, https://github.com/vuejs/vue/blob/dev/src/server/webpack-plugin/server.js#L50-L52, it shows:

        }
        // do not emit anything else for server
        delete compilation.assets[asset.name]

Which this is removing the assets, simply just do this instead:

        } else {
          // do not emit anything else for server
          delete compilation.assets[asset.name]
        }

@RossComputerGuy
Copy link

I've made a fix for this, vuejs/vue#11598

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants