Git Product home page Git Product logo

Comments (4)

peterlukerow avatar peterlukerow commented on July 17, 2024 1

In a game of wack-a-mole, if I config Combres to use msajax JS minifier then the public side of my site that caused the exception in the opening issue statement works fine. However, now the admin side of my site appears to not minify the JS correctly and this ends up with a JS syntax error that then prevents jQuery from working and thus the site fails to work correctly.

from combres.

buunguyen avatar buunguyen commented on July 17, 2024

It looks like the minifier can't parse the JS. Maybe try with a different minifier to see if any luck? There are 3 JS minifiers in total.

Besides, I haven't updated Combres for a while so it's stuck with old version of minifier. Would be great if someone could bump the version of both CSS and JS minifiers, I'd be happy to review a PR and coordinate to update NuGet.

from combres.

peterlukerow avatar peterlukerow commented on July 17, 2024

I tried the msajax one which works for the public area but then fails for the admin area.
The other minifier didn't work at all.

I manage to figure it out in the end. The problem with the YUI (default) minifier was that our JS was using some ECMAScript 6 syntax - specifically "() => { function code }" and "(event) => { function code }". Converting this JS to something like "function() { func code }" and "function(event) { func code}" solved the issue.

So it seems like none of the minifiers can correctly parse the latest JS standards correctly and if they can they fail for other reasons. I didn't figure out the other reasons because of the above change working so I was able to stick with the default minifier.

from combres.

buunguyen avatar buunguyen commented on July 17, 2024

I see. The minifiers are very out of date, I'm sure the latest version would work. That being said, I don't even have a window box these days to build and test. So if anyone wanting to contribute, I'll add as collaborator on this repo.

from combres.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.