razzle icon indicating copy to clipboard operation
razzle copied to clipboard

Use babel-polyfills with browserslist in babel loader

Open fivethreeo opened this issue 3 years ago • 5 comments

fivethreeo avatar Feb 09 '22 15:02 fivethreeo

Use browserslist if the plugin finds a env for current build

fivethreeo avatar Feb 09 '22 15:02 fivethreeo

https://github.com/babel/babel-polyfills/blob/main/docs/migration.md

fivethreeo avatar Feb 23 '22 16:02 fivethreeo

https://github.com/browserslist/browserslist/commit/51a1ad21a071d0af9c441ce9f392782df9573ed3

fivethreeo avatar Apr 03 '22 19:04 fivethreeo

transform runtime adds all polyfills, ignores target, babel-polyfills respects target

i want to use browserslist to make everything configurable via .browserslistrc envs

for node aswell as web, and per build https://github.com/jaredpalmer/razzle/blob/alpha/packages/razzle-plugin-webpack5/src/index.ts#L17

so .browserslist can have default-web and default-node and e.g. modern-web

current node is a valid target in latest browserslists

fivethreeo avatar Apr 03 '22 21:04 fivethreeo

also use browserslist in webpack target

fivethreeo avatar May 05 '22 21:05 fivethreeo