'entry' | 'usage' | 'off'
'usage'
Through the output.polyfill
option, you can control the injection mode of the polyfills.
When output.polyfill
is configured as 'usage'
, Rsbuild will inject the polyfills based on the APIs used in each file.
When output.polyfill
is configured as 'entry'
, Rsbuild will inject the polyfills in each entry file.
When output.polyfill
is configured as 'off'
, Rsbuild will not inject the polyfills, and developers need to ensure code compatibility themselves.
Please refer to the Polyfill Mode for more details.