Skip to content

feat: export Rspack and Rsbuild #883

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

Merged
merged 3 commits into from
Mar 28, 2025
Merged

feat: export Rspack and Rsbuild #883

merged 3 commits into from
Mar 28, 2025

Conversation

Timeless0911
Copy link
Contributor

@Timeless0911 Timeless0911 commented Mar 28, 2025

Summary

Make developers convenient to import rspack instance and related Rsbuild public APIs and types in Rslib configuration files.

import { defineConfig, rsbuild, rspack } from '@rslib/core';

type EnvironmentContext = rsbuild.EnvironmentContext;
const PLUGIN_SWC_NAME = rsbuild.PLUGIN_SWC_NAME;

export default defineConfig({
  lib: [
    {
      format: 'esm',
      tools: {
        rspack: {
          plugins: [new rspack.CircularDependencyRspackPlugin({})],
        },
      },
    },
  ],
});

Related Links

Checklist

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

fi3ework
fi3ework previously approved these changes Mar 28, 2025
@Timeless0911 Timeless0911 merged commit a6c4b1a into main Mar 28, 2025
15 checks passed
@Timeless0911 Timeless0911 deleted the feat/export-rspack branch March 28, 2025 09:30
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