Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts are uglifyed even if useMin is true and a minSrc is specified #75

Open
Waymoot opened this issue Mar 16, 2016 · 1 comment
Open
Labels

Comments

@Waymoot
Copy link

Waymoot commented Mar 16, 2016

I had to mix Prototype and jQuery and for some reason Prototype could not be uglifyed.
I created a compressed version of Prototype with no uglify (just remove comments and space)
The output shows that it uses the minSrc file but it uglify it again during processing which breaks the code.

module.exports = {
  bundle: {
    vendor: {
      scripts: [
          './path/to/jquery.js',
          {
              src: './bower_components/jquery/dist/prototype.js',
              minSrc: './bower_components/jquery/dist/prototype.compressed.js'
          }
       ],
        options: {
             rev:    false,  // do not add #hash to filename
             uglify: true   // uglify js code
             useMin: true  // use pre-compressed src when available (needed for Prototype)
        }
     }
  }
}

in Gulpfile I just got the bundle.config.js and piped bundle() so nothing fancy at all.

@chmontgomery
Copy link
Contributor

I think there is a bug when uglify and useMin are used together. The uglify option forces uglification no matter what. What should happen is what you describe: useMin should override the uglify option if minSrc is defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants