I'm trying to use minify library to bundle and minify all my JavaScripts and CSSs, minimum code:
js := bytes.Buffer{}
dat, err := ioutil.ReadFile(fname)
if L.Check(err, `File doesn't exists: `+fname) == nil {
dat, err = min.MinifyBytes(`text/js`, dat)
js.Write(dat)
js.WriteRune(';')
}
But that code failed with err="max buffer exceeded"
when minifying ace.js and jquery.dataTables.js (>400 KB) is this bytes.Buffer
problem? and how to fix this?