Skip to content

Commit 01f3b2b

Browse files
fix: use absolute paths in rsbuild-plugin rollup config
Use path.resolve with process.cwd() to create absolute paths for the input files, matching how other packages like rspack handle their rollup configuration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 907475a commit 01f3b2b

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

packages/rsbuild-plugin/rollup.config.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const copy = require('rollup-plugin-copy');
2+
const path = require('path');
23

34
module.exports = (rollupConfig, _projectOptions) => {
45
rollupConfig.plugins.push(
@@ -16,9 +17,18 @@ module.exports = (rollupConfig, _projectOptions) => {
1617
rollupConfig.external = [/@module-federation/, '@rsbuild/core'];
1718

1819
rollupConfig.input = {
19-
index: 'packages/rsbuild-plugin/src/cli/index.ts',
20-
utils: 'packages/rsbuild-plugin/src/utils/index.ts',
21-
constant: 'packages/rsbuild-plugin/src/constant.ts',
20+
index: path.resolve(
21+
process.cwd(),
22+
'./packages/rsbuild-plugin/src/cli/index.ts',
23+
),
24+
utils: path.resolve(
25+
process.cwd(),
26+
'./packages/rsbuild-plugin/src/utils/index.ts',
27+
),
28+
constant: path.resolve(
29+
process.cwd(),
30+
'./packages/rsbuild-plugin/src/constant.ts',
31+
),
2232
};
2333

2434
rollupConfig.output.forEach((output) => {

0 commit comments

Comments
 (0)