You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered an issue with the ECMA-VERSION-CHECK feature in Rsbuild. It appears that this check may not be respecting the settings in the .browserslistrc file as expected. Here are my observations:
Under default settings, regardless of how I modify the .browserslistrc file, ECMA-VERSION-CHECK consistently enforces ES5 standards. It produces warnings like: "The ECMA version used in "XXX.js" is ES7+, which exceeds the ES5 standard."
The issue is resolved when I explicitly set the configuration as follows:
'ecma-version-check': ['Error', { highestVersion: 'ES7+', ignore: [] }],
This raises two questions:
Does ECMA-VERSION-CHECK actually follow the settings in .browserslistrc? If so, why doesn't it seem to be reflecting changes made to this file?
Why are the highestVersion and ignore options not documented, despite being functional? It would be helpful to have these options clearly explained in the documentation.
I would appreciate any clarification on these points. If this is indeed a bug, it would be beneficial to align ECMA-VERSION-CHECK with the .browserslistrc settings for more consistent and predictable behavior.
Version
System: macos
browsers: chrome126
npmPackages: 0.4.8
Details
I've encountered an issue with the ECMA-VERSION-CHECK feature in Rsbuild. It appears that this check may not be respecting the settings in the .browserslistrc file as expected. Here are my observations:
Under default settings, regardless of how I modify the .browserslistrc file, ECMA-VERSION-CHECK consistently enforces ES5 standards. It produces warnings like: "The ECMA version used in "XXX.js" is ES7+, which exceeds the ES5 standard."
The issue is resolved when I explicitly set the configuration as follows:
'ecma-version-check': ['Error', { highestVersion: 'ES7+', ignore: [] }],
This raises two questions:
Does ECMA-VERSION-CHECK actually follow the settings in .browserslistrc? If so, why doesn't it seem to be reflecting changes made to this file?
Why are the highestVersion and ignore options not documented, despite being functional? It would be helpful to have these options clearly explained in the documentation.
I would appreciate any clarification on these points. If this is indeed a bug, it would be beneficial to align ECMA-VERSION-CHECK with the .browserslistrc settings for more consistent and predictable behavior.
Thank you for your attention to this matter.
Reproduce link
https://github.com/lichenabson/rsbuild-project/tree/rsdoctor
Reproduce Steps
pnpm run build:rsdoctor
The text was updated successfully, but these errors were encountered: