-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
app.js script chunk rendered twice #158
Comments
Not surprisingly, this commit introduced the issue: f9d4093 |
@Akryum |
Since it's apparently not possible to alter the configuration of the html plugin in vue.config.js, I've created #160 |
You saved my day! Just for reference, it also seemed to be causing following errors for me (both came after update to 0.6.0):
When I applied the fix for #160 problems disappeared. |
actually it's possible to fix it by only changing vue.config.js chainWebpack: (config) => {
// https://github.com/Akryum/vue-cli-plugin-ssr/issues/158
const htmlSsrPlugin = config.plugins.get('html-ssr')
if (htmlSsrPlugin) {
htmlSsrPlugin.store.get('args')[0].chunks = []
}
} |
Hi, i'm using v0.6.0.
i'm facing the issue that the app.js chunk is rendered twice: renderScripts() renders the <script src="...../app.js" defer> into the index.ssr.html and the htmlPlugin included in vue-cli-plugin-ssr renders <script src=".../app.js"> as well into the markup, such that it gets loaded twice by the browser and vue gets hydrated twice as well.
https://webpack.js.org/plugins/html-webpack-plugin/ states:
The specific code is: https://github.com/Akryum/vue-cli-plugin-ssr/blob/master/lib/webpack.js#L54
If i add
chunks: []
there, it works fine again, such that it is no longer rendered twice.The text was updated successfully, but these errors were encountered: