Clarification on resolve plugins and virtual modules #6699
Unanswered
ceopaludetto
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I’ve written a plugin using Unplugin and I want to add support for Rspack. Currently, my plugin heavily relies on virtual modules. Essentially, I resolve imports with these patterns: ["/~translations/", "~translations/", "virtual:translations/*"] into a single pattern: /~translations, to be loaded later (pretty basic stuff). After some investigation, I found that the Unplugin abstraction does not support the resolve logic in Rspack (unjs/unplugin#311).
I want to add support on the Unplugin side, but I need to address a few questions:
The Unplugin logic seems to be straightforward (as seen in the webpack version: https://github.com/unjs/unplugin/blob/a01da85ed2f9924e8361df14a21e887e14bf0e67/src/webpack/index.ts#L61). However, based on my understanding from the documentation, I haven’t found any mechanism to handle incoming resolve requests. What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions