swagger-api / swagger-api/swagger-ui
Invalid sourcemaps in dist/
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: Windows
- Browser: NA
- Version: latest (
masterbranch) - Method of installation: NA
- Swagger-UI version: latest (
masterbranch) - Swagger/OpenAPI version: NA
Describe the bug you're encountering
The .map files provided in the dist/ folder seem to be invalid, based on sourcemap-validator
To reproduce...
Steps to reproduce the behavior:
- Install the
sourcemap-validatecommand:
npm install -g git+https://github.com/Lucas-C/sourcemap-validator.git - Execute the following command in this repo:
sourcemap-validate dist/swagger-ui-bundle.js dist/swagger-ui-bundle.js.map
Expected behavior
Validation OK
Additional context or thoughts
Using sourcemap-validate I tested that the Validation OK message appears up to tag v3.3.0. Starting from tag v3.4.0 the error appears.
I found about this error in https://github.com/springfox/springfox/issues/3114, because my Firefox browser could not load the sourcemaps correctly.
Based on the package-lock.json in this repo I cannot pinpoint exactly what version of webpack-sources it is using, but this error may be due to a nasty bug broke sourcemaps it generated before version 1.4.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running sourcemap-validate against dist/swagger-ui-bundle.js and dist/swagger-ui-bundle.js.map, then inspect package-lock.json and the build configuration for the webpack-sources version used since v3.4.0. Done means the generated .map files validate successfully and the command reports "Validation OK".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100