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

feat: provide type declaration for builtin:swc-loader #6314

Merged
merged 8 commits into from
Apr 22, 2024

Conversation

chenjiahan
Copy link
Member

Summary

Provide type declaration for builtin:swc-loader. Example:

// rspack.config.js
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        use: {
          loader: 'builtin:swc-loader',
          /** @type {import('@rspack/core').SwcLoaderOptions} */
          options: {
            // some options
          },
        },
      },
    ],
  },
};

Resolve #4485

Some types are modified from https://github.com/swc-project/swc/blob/16a38851/packages/types/index.ts#L647

Checklist

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

@chenjiahan chenjiahan requested review from h-a-n-a and 9aoy April 22, 2024 08:45
@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Apr 22, 2024
Copy link

netlify bot commented Apr 22, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 3ea5676
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/66263403aa66660008960034

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 22, 2024
@chenjiahan
Copy link
Member Author

!canary

Copy link
Contributor

0.6.2-canary-73bf70c-20240422091802

9aoy
9aoy previously approved these changes Apr 22, 2024
@chenjiahan
Copy link
Member Author

!canary

@chenjiahan chenjiahan merged commit 66d1ae6 into main Apr 22, 2024
29 checks passed
@chenjiahan chenjiahan deleted the swc_loader_options_0422 branch April 22, 2024 10:45
Copy link
Contributor

0.6.2-canary-3ea5676-20240422105523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

builtin:swc-loader do not provide a type declaration
3 participants