Skip to content

Deprecation warning on experiments.lazyBarrel in Rspack 1.7+ in @docusaurus/faster #11688

Description

@tats-u

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

if (process.env.DISABLE_RSPACK_LAZY_BARREL) {
console.log('Rspack lazyBarrel disabled');
experiments.lazyBarrel = false;
} else {
// TODO remove after we upgrade to Rspack 1.6+
// Enabled by default for Rspack >= 1.6
experiments.lazyBarrel = true;
}

This property is deprecated by packages/rspack/src/config/normalization.ts in Rspack:

web-infra-dev/rspack@ff4d368#diff-78648f723799beccc94c4b2e506997d12d1ace8216aeb31c0731c37a6dce024a

			if (experiments.lazyBarrel) {
				util.deprecate(
					() => {},
					"`experiments.lazyBarrel` config has been deprecated and will be removed in Rspack v2.0. Lazy barrel is already stable and enabled by default. Please remove this option from your Rspack configuration."
				)();
			}

https://github.com/web-infra-dev/rspack/blob/ff4d368956a296062cbbc4e7411692de1e2caba2/packages/rspack/src/config/normalization.ts#L369-L374

and is going to be inaccessible by Rspack 2:

https://github.com/web-infra-dev/rspack/pull/12724/changes#diff-78648f723799beccc94c4b2e506997d12d1ace8216aeb31c0731c37a6dce024a

We had better remove it until Rspack 2 is released.

Reproducible demo

No response

Steps to reproduce

  1. Enable @docusaurus/faster
  2. docusaurus start or docusaurus build

Expected behavior

No deprecation warnings

Actual behavior

[Rspack Deprecation] `experiments.lazyBarrel` config is deprecated and will be removed in Rspack v2.0. Lazy barrel is already stable and enabled by default. Remove this option from your Rspack configuration.

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used: 3.9.2
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Node 24.13.0
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows 25H2

@rspack/core: 1.7.3

Affected on 1.7+: web-infra-dev/rspack@ff4d368

Self-service

  • I'd be willing to fix this bug myself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionstatus: needs triageThis issue has not been triaged by maintainers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions