tedious / JShrink

Javascript Minifier built in PHP
http://www.tedivm.com
BSD 3-Clause "New" or "Revised" License
751 stars 152 forks source link

Some js not usable after JShrink minification (example: axios code) #107

Closed peminator closed 1 year ago

peminator commented 2 years ago

I tried to put into one .js file to minify count of file requests, first content of minified axios javascript, then some newline (comments etc) and then own code.

Axios is sure a modern and popular thing which should be considered important, and if it minified is buggy, then possibly other llibraries using the same minification may cause the same issues (webpack based minification)

Without shrinking it works fine, minified code from JSrink does not work anymore

To repeat, just find axios cdn, try copypasting content to local js file, then add newline and some own simple command, like

/* axios minified code first*/
{put here contents from https://cdnjs.cloudflare.com/ajax/libs/axios/0.27.2/axios.min.js}

/* own code */
console.log(1234);
document.body.innerHTML = 'WORKS!';

then just use script tag in some html, and after loading check console

tedivm commented 1 year ago

Closing as duplicate of #101