diff --git a/.yarn/versions/c8b9b062.yml b/.yarn/versions/c8b9b062.yml new file mode 100644 index 000000000000..66f1a5abf11a --- /dev/null +++ b/.yarn/versions/c8b9b062.yml @@ -0,0 +1,12 @@ +releases: + "@yarnpkg/builder": minor + +declined: + - "@yarnpkg/plugin-constraints" + - "@yarnpkg/plugin-exec" + - "@yarnpkg/plugin-interactive-tools" + - "@yarnpkg/plugin-stage" + - "@yarnpkg/plugin-typescript" + - "@yarnpkg/plugin-version" + - "@yarnpkg/plugin-workspace-tools" + - "@yarnpkg/cli" diff --git a/packages/yarnpkg-builder/sources/commands/build/plugin.ts b/packages/yarnpkg-builder/sources/commands/build/plugin.ts index 2576e7111ba5..12dc07b5ad0f 100644 --- a/packages/yarnpkg-builder/sources/commands/build/plugin.ts +++ b/packages/yarnpkg-builder/sources/commands/build/plugin.ts @@ -128,6 +128,15 @@ export default class BuildPluginCommand extends Command { minify: !this.noMinify, sourcemap: this.sourceMap ? `inline` : false, target: `node${semver.minVersion(pkg.engines.node)!.version}`, + supported: { + /* + Yarn plugin-runtime did not support builtin modules prefixed with "node:". + See https://github.com/yarnpkg/berry/pull/5997 + As a solution, and for backwards compatibility, esbuild should strip these prefixes. + */ + 'node-colon-prefix-import': false, + 'node-colon-prefix-require': false, + }, }); for (const warning of res.warnings) {