The main branch renders a working “Hello World” React app. It includes as a dependency but does not directly import swagger-ui.
Atm, the feat/babel branch imports swagger-ui but does not render. The feat/babel branch represents current investigation into adding Babel transpiler, but may not be the correct path to a solution of the immediate issue. The theory was that Parcel 2.x needed additional polyfills and/or Babel transpiliation.
From this screenshot, if Babel is not the solution, there may be an issue with SwaggerUI, specifically looking at the memoizeN.js file.
Sidenote, importing css from SwaggerUI library also has errors. This is true if loading directly in html or in the javascript code.
Additionally, I tried using Parcel 1.x, which introduced a whole set of different issues, especially with outdated dependencies. Parcel 2.x was released in Oct'21, and we should probably use it in new projects.
I also tried adding additional alias and installing known polyfills from swagger-ui and swagger-editor projects, which are not reflected in the feat/babel branch.
The
main
branch renders a working “Hello World” React app. It includes as a dependency but does not directly importswagger-ui
.Atm, the
feat/babel
branch importsswagger-ui
but does not render. Thefeat/babel
branch represents current investigation into adding Babel transpiler, but may not be the correct path to a solution of the immediate issue. The theory was that Parcel 2.x needed additional polyfills and/or Babel transpiliation.From this screenshot, if Babel is not the solution, there may be an issue with SwaggerUI, specifically looking at the
memoizeN.js
file.Additionally, if one comments out this line: https://github.com/tim-lai/parcel-swagger-ui/blob/f538c8e6ea099f114e165f38113c32216248de59/src/App.js#L1 one can reproduce the error above. Note that this line change simply imports swagger-ui, and does not yet instantiate a SwaggerUI instance.
Sidenote, importing css from SwaggerUI library also has errors. This is true if loading directly in html or in the javascript code.
Additionally, I tried using Parcel 1.x, which introduced a whole set of different issues, especially with outdated dependencies. Parcel 2.x was released in Oct'21, and we should probably use it in new projects.