build(babel): use browserslist explicitly (#9207)

This commit is contained in:
Vladimír Gorej
2023-09-13 15:08:15 +02:00
committed by GitHub
parent f151685f64
commit 955c0ddbac
5 changed files with 140 additions and 216 deletions

View File

@@ -24,8 +24,8 @@ cp ../../../dist/swagger-ui.css.map ../dist
node create-manifest.js > ../dist/package.json
# Transpile our top-level component
../../../node_modules/.bin/cross-env BABEL_ENV=commonjs ../../../node_modules/.bin/babel --config-file ../../../babel.config.js ../index.jsx > ../dist/index.cjs
../../../node_modules/.bin/cross-env BABEL_ENV=esm ../../../node_modules/.bin/babel --config-file ../../../babel.config.js ../index.jsx > ../dist/index.mjs
../../../node_modules/.bin/cross-env NODE_ENV=production BABEL_ENV=commonjs BROWSERSLIST_ENV=isomorphic-production ../../../node_modules/.bin/babel --config-file ../../../babel.config.js ../index.jsx > ../dist/index.cjs
../../../node_modules/.bin/cross-env NODE_ENV=production BABEL_ENV=esm BROWSERSLIST_ENV=browser-production ../../../node_modules/.bin/babel --config-file ../../../babel.config.js ../index.jsx > ../dist/index.mjs
# Copy our README into the dist folder for npm
cp ../README.md ../dist