Skip to content

ES bundle uses CommonJS-style exports. #6678

@TimUnderhay

Description

@TimUnderhay

Q&A (please complete the following information)

  • Swagger-UI version: 3.37.2
  • Swagger/OpenAPI version: N/A

Content & configuration

Apologies if this isn't considered a bug, but I couldn't find anything clearly explaining this. The ES bundle artefacts still use CommonJ-style exports. I expected that they would be utilising ES6/ES2015-style exports, for use in frameworks like Angular and others that prefer the ES format over CommonJS, for tree-shaking purposes.

swagger-ui-es-bundle.js:
module.exports=function(e){var t={};function...

Should be something like:
export default function(e){var t={};function...

Example Swagger/OpenAPI definition:
N/A

Swagger-UI configuration options:
N/A

Describe the bug you're encountering

To reproduce...

  1. Have a look at swagger-ui-es-bundle.js

Expected behavior

ES module should use ES-style exports.

Screenshots

N/A

Additional context or thoughts

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions