File: target.md

package info (click to toggle)
ruby-webpacker 5.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,472 kB
  • sloc: ruby: 1,626; javascript: 1,480; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 859 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Target browsers

By default webpacker provides these front-end tools:
- [@babel/preset-env](https://github.com/babel/babel/tree/master/packages/babel-preset-env)
- [Autoprefixer](https://github.com/postcss/autoprefixer)
- [postcss-preset-env](https://github.com/csstools/postcss-preset-env)

All these tools use [Browserslist](https://github.com/browserslist/browserslist) to detect which environment your users have

Webpacker browserslist default target:
```
defaults
```

`defaults`: `(> 0.5%, last 2 versions, Firefox ESR, not dead)`, [browserl.ist](https://browserl.ist/) is an online tool to check what browsers will be selected by some query.

To keep browsers data up to date, you need to run:
```bash
yarn upgrade caniuse-lite
```

at least once every few months, to prevent such [problems](https://github.com/browserslist/browserslist/issues/492)