replace const with var in bundled script