Skip to content

feat: support for resolve and context in api.transform#4426

Merged
chenjiahan merged 2 commits intomainfrom
feat/loader-resolve-api
Jan 24, 2025
Merged

feat: support for resolve and context in api.transform#4426
chenjiahan merged 2 commits intomainfrom
feat/loader-resolve-api

Conversation

@9aoy
Copy link
Copy Markdown
Contributor

@9aoy 9aoy commented Jan 24, 2025

Summary

Support for resolve and context in api.transform, same as rspack loader api.

    api.transform(
      { test: /index\.js$/ },
      async ({ code, resolve, context, resource }) => {
        resolve(context!, '@foo', (err, res) => {
          console.log('resolved', res);
        });
      },
    );

https://rspack.dev/api/loader-api/context

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 24, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 3b0a0dc
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/6793471666724600088a478c
😎 Deploy Preview https://deploy-preview-4426--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 76 (🟢 up 2 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@chenjiahan chenjiahan merged commit 4855f2d into main Jan 24, 2025
@chenjiahan chenjiahan deleted the feat/loader-resolve-api branch January 24, 2025 08:06
@chenjiahan chenjiahan mentioned this pull request Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants