Skip to content

Commit

Permalink
fix(swagger-ui-react): fix build scripts and allow releasing (#9191)
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n authored Sep 5, 2023
1 parent 5a3151d commit 70b0140
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
module.exports = {
"env": {
"commonjs": {
"presets": [
[
"@babel/preset-env",
{
"debug": false,
"modules": "commonjs",
"loose": true,
"targets": "maintained node versions",
"forceAllTransforms": false,
"ignoreBrowserslistConfig": true,
}
],
"@babel/preset-react",
],
},
"esm": {
"presets": [
[
Expand Down
2 changes: 1 addition & 1 deletion flavors/swagger-ui-react/release/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ 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=es ../../../node_modules/.bin/babel --config-file ../../../babel.config.js ../index.jsx > ../dist/index.mjs
../../../node_modules/.bin/cross-env BABEL_ENV=esm ../../../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
Expand Down

0 comments on commit 70b0140

Please sign in to comment.