Skip to content

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.

3 participants