Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(swagger-ui-react): fix build scripts and allow releasing #9191

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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