mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-30 05:41:50 +02:00
feat(build): add JavaScript minification support and use minified loading.js
- Add `minify-js` target to Makefile that minifies JavaScript files in internal/ - Update `build` and `run` targets to run minification before building/running - Replace `html/loading.js` embed with `html/loading-min.js` in loading_page.go This change optimizes the loading page performance by embedding minified JavaScript instead of the full source file. The Makefile now automatically generates minified versions of JavaScript files during build and run operations.
This commit is contained in:
@@ -25,7 +25,7 @@ var loadingPageTmpl = template.Must(template.New("loading_page").Parse(string(lo
|
||||
//go:embed html/style.css
|
||||
var cssBytes []byte
|
||||
|
||||
//go:embed html/loading.js
|
||||
//go:embed html/loading-min.js
|
||||
var jsBytes []byte
|
||||
|
||||
func (w *Watcher) writeLoadingPage(rw http.ResponseWriter) error {
|
||||
|
||||
Reference in New Issue
Block a user