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

why ssr module registration was removed from v16 #1887

Open
tcstory opened this issue Oct 12, 2021 · 8 comments
Open

why ssr module registration was removed from v16 #1887

tcstory opened this issue Oct 12, 2021 · 8 comments

Comments

@tcstory
Copy link

tcstory commented Oct 12, 2021

Version

16.8.1

Reproduction link

github.com

Steps to reproduce

i have no idea why the functionality was removed. it's very important for ssr rendering.

vitejs/plugin-vue and vue-loader are both plugins, why vitejs/plugin-vue has this functionality but vue-loader doesnt

What is expected?

ssr module registration should be support

What is actually happening?

ssr module registration was removed

@haoqunjiang
Copy link
Member

Please be more specific. I don't understand what you mean by "ssr module registration"

@tcstory
Copy link
Author

tcstory commented Oct 12, 2021

sorry.

version 15.x of vue-loader will use the following code to add the component during ssr rendering, the code is located in lib/runtime/componentNormalizer.js

// register component module identifier for async chunk inferrence
if (context && context._registeredComponents) {
  context._registeredComponents.add(moduleIdentifier)
}

@haoqunjiang
Copy link
Member

Oh, that was a planned but not yet implemented feature.
As you can see, the SSR tests are still listed as TODOs.

Thanks for bringing this up.
I'll see if I can implement it when I have time.

Contributions are also welcome.

@phoenix-ru
Copy link

phoenix-ru commented Nov 22, 2021

Hi @sodatea. I've implemented critical CSS collection in https://github.com/phoenix-ru/vue-loader.

However, my solution assumes that vue-style-loader is used (as with v15). Can you verify if that's acceptable or v16 dropped vue-style-loader for a reason?

If that solution is fine, I can open a PR and polish it

@BlackCubeNo99
Copy link

BlackCubeNo99 commented Aug 30, 2022

Oh, that was a planned but not yet implemented feature. As you can see, the SSR tests are still listed as TODOs.

Thanks for bringing this up. I'll see if I can implement it when I have time.

Contributions are also welcome.

Does anyone have a work around? @sodatea

mog422 added a commit to mog422/vue-loader that referenced this issue Jul 19, 2024
mog422 added a commit to mog422/vue-loader that referenced this issue Jul 20, 2024
mog422 added a commit to mog422/vue-loader that referenced this issue Jul 20, 2024
mog422 added a commit to mog422/vue-loader that referenced this issue Jul 20, 2024
niksy pushed a commit to niksy/vue-loader that referenced this issue Aug 7, 2024
@dmitryuk
Copy link

dmitryuk commented Nov 2, 2024

Hello, any plans?

@OskarLebuda
Copy link

Hello, any plans?

@dmitryuk I don't think so. There is a open PR since August by @niksy #2083
But @yyx990803, @haoqunjiang or any other contributors doesn't care about it. The fork is the only way I think.

It will be only worst. The rolldown comming up, so I think they will drop support for Webpack any time soon. Last commit in this repo was 10 months ago.

We've made a fork for our purposes, add patch by niks and seams to work fine for us.

@niksy
Copy link

niksy commented Nov 14, 2024

This is really unfortunate becuase Vue loader will probably still be actively used because of Rspack and it’s Vue support.

The other solution (and probably best approach) can be unplugin-vue, but it’s missing HMR support for Webpack/Rspack.

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

No branches or pull requests

7 participants