armin-pfaeffle / atom-minify

Minifies JS and CSS files, optionally on save ‒ package for atom.io
https://atom.io/packages/atom-minify
MIT License
24 stars 7 forks source link

Cannot minify when adding class to DOM object in JS/Jquery #47

Closed SimpenSimon closed 6 years ago

SimpenSimon commented 7 years ago

This is the part of the code that doesn't work (with a different id, src and class name) :

newObject = $('<img />', {
    id: 'image',
    src: 'image.jpg',
    class: 'greatClassName'
});

if I either remove "class" or change it to "className" the file will be minified but it will not add the class to the object. However, if I save the file without minifying it and using the code above, then the object will get the class so I know that it's a bug in the minifyer and not with the code itself.

armin-pfaeffle commented 7 years ago

Have you tried another minifier? Which one do you use?

The minifiers itself are not my projects. atom-minify is only a wrapper and does not minify anything.