Skip to content

Commit 2eb6fc9

Browse files
underootmourner
authored andcommitted
[GLJS-888] Add .browserslistrc (internal-2386)
1 parent ee7e13a commit 2eb6fc9

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.browserslistrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
>0.2%,
2+
not dead,
3+
not op_mini all,
4+
not chrome < 51,
5+
not safari < 10,
6+
not android < 51

build/rollup_plugins.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import terser from '@rollup/plugin-terser';
1010
import strip from '@rollup/plugin-strip';
1111
import replace from '@rollup/plugin-replace';
1212
import {createFilter} from '@rollup/pluginutils';
13+
import browserslistToEsbuild from 'browserslist-to-esbuild';
1314
import minifyStyleSpec from './rollup_plugin_minify_style_spec.js';
1415

1516
// Common set of plugins/transformations shared across different rollup
@@ -18,9 +19,7 @@ import minifyStyleSpec from './rollup_plugin_minify_style_spec.js';
1819
export const plugins = ({mode, minified, production, test, bench, keepClassNames}) => [
1920
minifyStyleSpec(),
2021
esbuild({
21-
// We target `esnext` and disable minification so esbuild
22-
// doesn't transform the code, which we'll minify later with the terser
23-
target: 'esnext',
22+
target: browserslistToEsbuild(),
2423
minify: false,
2524
sourceMap: true,
2625
define: {

package-lock.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"@vitest/ui": "^2.0.3",
7070
"address": "^2.0.3",
7171
"browserify": "^17.0.1",
72+
"browserslist-to-esbuild": "^2.1.1",
7273
"chalk": "^5.4.1",
7374
"chokidar": "^4.0.3",
7475
"cross-env": "^7.0.3",

0 commit comments

Comments
 (0)