Skip to content
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

[Bug]: Rsbuild will run twice due to output.copy setting in dev mode. #8673

Open
xbzhang2020 opened this issue Dec 11, 2024 · 0 comments
Open

Comments

@xbzhang2020
Copy link

Version

System:
    OS: macOS 14.6.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 154.31 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 131.0.6778.109
    Safari: 17.6

Details

When starting the example of output.copy in dev mode, I found that Rsbuild ran twice.

Image

But if I modify the code { from: './src/assets' } to { from: 'src/assets' }, Rsbuild will run correctly.

Image

The problem may be caused by rspack.CopyRspackPlugin. Because Rspack has the same problem in dev mode.

Image

Reproduce link

https://rsbuild.dev/config/output/copy#example

Reproduce Steps

  1. Copy the code from the example.
// rsbuild.config.js
export default {
  output: {
    copy: [
      { from: './src/assets' },
    ],
  },
};
  1. Run npm run dev.
@chenjiahan chenjiahan transferred this issue from web-infra-dev/rsbuild Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant