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
sourceMappingURL
in built JS is invalid
#2343
Closed
5 tasks done
polarathene opened this issue
Feb 25, 2021
· 3 comments
· Fixed by aws/jsii#2693, hacf-fr/awesome-francophone-home-assistant#106 or JosephMontoya-TRI/BEEP#3
Closed
5 tasks done
sourceMappingURL
in built JS is invalid
#2343
polarathene opened this issue
Feb 25, 2021
· 3 comments
· Fixed by aws/jsii#2693, hacf-fr/awesome-francophone-home-assistant#106 or JosephMontoya-TRI/BEEP#3
Comments
Confirmed, indeed the |
Fixed in 1aacca3. |
Released as part of 7.0.2 |
This was referenced Mar 8, 2021
Closed
This was referenced Mar 15, 2021
Closed
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've found a bug and checked that ...
Description
I am fairly certain this isn't related to upstream MkDocs, AFAIK the asset bundling optimization is only offered by MkDocs Material here. The minified output files are incorrectly pointing to the Source Map files they generate, which the browser console will issue warnings about as unable to parse, thus they're not useful.
This appears to be the related code as your docs mention you use ESBuild:
mkdocs-material/tools/build/transform/index.ts
Lines 179 to 189 in d65e880
Slightly related, advice for adding JS via the docs here seems to mirror roughly what upstream MkDocs advise. I assume that these third-party assets are not included in the bundling during build? (seems to only process
bundle
andsearch
TS files from this projectssrc/**
dir)Expected behavior
Processed JS file should be:
//# sourceMappingURL=bundle.926459b3.min.js.map
Actual behavior
Processed JS files are actually:
//# sourceMappingURL=bundle.926459b3.min.js
Probably just needs to be:
`$1${path.basename(file)}.map\n`
Steps to reproduce the bug
Package versions
Current Docker container and current version of the website.
Project configuration
Standard instance should do the trick, this is an internal bug.
System information
Manjaro Linux with Firefox. Present with Docker container build, present with Github Action workflow (python pip install, not docker) build deployed to Github Pages.
The text was updated successfully, but these errors were encountered: