I've noticed that when using externalsType: 'script' for asynchronously loading CDN files, the final build output always includes async/await syntax for the asynchronous CDN loading, regardless of the browser range specified in .browserslistrc. This causes compatibility issues in older browsers.
Specifically:
Setting externalsType: 'script' is intended to load CDN files asynchronously.
The .browserslistrc file is configured to target specific browser versions.
However, the build output consistently uses async/await syntax for CDN loading, ignoring the .browserslistrc settings.
This results in compatibility problems with older browsers that don't support async/await.
Version
System: macos Browser: Chrome126 npmPackages: @rsbuild/core@1.0.18
Details
I've noticed that when using externalsType: 'script' for asynchronously loading CDN files, the final build output always includes async/await syntax for the asynchronous CDN loading, regardless of the browser range specified in .browserslistrc. This causes compatibility issues in older browsers.
Specifically:
Setting externalsType: 'script' is intended to load CDN files asynchronously. The .browserslistrc file is configured to target specific browser versions. However, the build output consistently uses async/await syntax for CDN loading, ignoring the .browserslistrc settings. This results in compatibility problems with older browsers that don't support async/await.
Reproduce link
https://www.marscode.cn/ide/7oqyxje9lq9nee
Reproduce Steps