-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
feat(ssr): vue-ssr-webpack-plugin compatible with webpack 5 #12002
Conversation
Hi colleagues. The last activity was several weeks ago... Currently, we try to move to Webpack 5 and have troubles with Vue SSR plugin. Please give some roadmap to adjust our deadlines and make appropriate decisions. Thanks in advance. |
@redneckz It's not a good practice, but you can copy https://github.com/gzzhanghao/vue/tree/ssr-webpack-5-build/packages/vue-server-renderer |
@@ -31,5 +31,8 @@ | |||
"devDependencies": { | |||
"vue": "file:../.." | |||
}, | |||
"peerDependencies": { | |||
"webpack": "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an optional peer dependency.
Users should be able to use this package without webpack.
@@ -10,7 +10,8 @@ export default class VueSSRServerPlugin { | |||
apply (compiler) { | |||
validate(compiler) | |||
|
|||
onEmit(compiler, 'vue-server-plugin', (compilation, cb) => { | |||
const stage = 'PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just put the stage name in the onEmit
function? It's not used anywhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sodatea client plugin and server plugin are applied in different stage, so I think it's better to specify the stage name here.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch for v2.x (or to a previous version branch), not themaster
branchfix #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
Similar to #11863, but:
Fix #11718
Close #11863