-
-
Notifications
You must be signed in to change notification settings - Fork 603
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: support inline loader #2867
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: 6f5c68c The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
h-a-n-a
force-pushed
the
feat/inline-loader
branch
from
April 23, 2023 11:14
d37240a
to
068ead6
Compare
hyf0
previously approved these changes
Apr 23, 2023
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.
Cool.
hyf0
approved these changes
Apr 23, 2023
Merged
siyou
pushed a commit
to siyou/rspack
that referenced
this pull request
May 14, 2023
* feat: init inline loader * chore: cleanup * fix: resolve context * refactor: rename resolve loader hook * test: use inline for pre post test * feat: user request should contain inline loaders as well * chore: cleanup * feat: add cgst * fix: fix wasm dependency
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue (if exists)
closes #1752
closes #2386
Summary
This PR adds support of inline-loader. Now you can inline loader requests:
See webpack's inline loader page for more details: https://webpack.js.org/concepts/loaders/#inline
🤖 Generated by Copilot at e152250
This pull request adds support for inline loaders in the
rspack
compiler and node binding. It simplifies theRawModule
enum and re-exports theJsLoaderAdapter
type. It introduces aresolver_factory
to enable parallel module resolution and different resolver types. It adds new hooks and types to the plugin API and thePluginDriver
. It implements anInlineLoaderResolver
plugin that can resolve and run JavaScript loaders. It moves some node-specific modules from therspack_core
crate to thenode_binding
crate. It removes some unused or commented-out code.Walkthrough
🤖 Generated by Copilot at e152250
InlineLoaderResolver
that can resolve inline loaders in module requests (link, link, link, link, link, link)loader_runner
andprocess_resource
modules from therspack_core
crate to thenode_binding
crate, as they are specific to the node binding crate (link)resolver_factory
field to theQueue
,CompilationArgs
, andNormalModuleFactory
structs, which is used to create different kinds ofResolver
s for different dependency types and categories (link, link, link, link, link, link)create
method of theNormalModuleFactory
struct to parse and resolve the inline loaders from the module request, and to skip the automatic loaders based on the!
prefix (link, link, link, link)before_loaders
to thePlugin
trait and thePluginDriver
struct, which allows plugins to modify modules before the loaders are applied (link, link, link, link, link, link)JsLoaderAdapter
type from theRawModule
enum, as it is no longer a valid variant (link)func
from theJsLoaderAdapter
struct, as it is no longer needed (link)VisitedModuleIdentity
from therspack_core
crate, as it is no longer used (link)