docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.47k stars 5.67k forks source link

fix: dev mode hot reload and add sourcemaps #2402

Closed jhildenbiddle closed 5 months ago

jhildenbiddle commented 5 months ago

Summary

Fixes two development issues:

  1. Hot reload was not working because the docs site was loading lib/docsify.min.js which was only updated on "production" builds. The build now generates minified and non-minified bundles for all builds.
  2. Source maps are now generated for all .min.js files in /lib/. This solution is best for troubleshooting during development because source maps provide unminified source code along with accurate file and line locations on errors. Using non-minified bundles for development was previously discussed, however this approach does not provide accurate source file and line locations.

Related issue, if any:

None

What kind of change does this PR introduce?

Bugfix Build-related changes

For any code change,

N/A

Does this PR introduce a breaking change?

No

Tested in the following browsers:

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docsify-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 13, 2024 7:20am
jhildenbiddle commented 5 months ago

@Koooooo-7 --

Awaiting approval to merge PR. Thx!