web-infra-dev / rspack

The fast Rust-based web bundler with webpack-compatible API 🦀️
https://rspack.dev
MIT License
10.24k stars 579 forks source link

[Bug]: build failed on Windows system. #8601

Open ZYanan0129 opened 1 day ago

ZYanan0129 commented 1 day ago

System Info

System: Windows 10 CPU Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz 1.90 GHz Binaries: node 16.18.1 npm 8.19.2 Browsers: chrome 131.0.6778.70 npmPackages: @rspack/cli: 1.1.2 @rspack/core: 1.1.2

Details

Hello, the same configuration in the project can be built successfully and started on macOS, but it fails to build and start on Windows. The error message located can be referenced as follows: Image Image This application used to be built using webpack,could start normally on both macOS and windows systems. Thanks ~~

Reproduce link

No response

Reproduce Steps

The output configuration information is as follows: output: { filename: path.join('./', 'js/[name].[chunkhash:8].js'), chunkFilename: path.join('./', 'js/[name].[chunkhash:8].chunk.js'), } Thanks ~~

LingyuCoder commented 23 hours ago

Can you provide the complete code in your picture so that we can determine exactly which character generation error caused it? A repro will be better

ZYanan0129 commented 21 hours ago

The first picture is source code from @rspack/cli,and the code marked in red blocks the application build. return "js\" + chunkId + ".chunk.js"; Our output configuration code is output: { filename: path.join('./', 'js/[name].[chunkhash:8].js'), chunkFilename: path.join('./', 'js/[name].[chunkhash:8].chunk.js'), } We guess whether it is related to the Windows system path translation. Thanks ~~