Code Monkey home page Code Monkey logo

Comments (10)

es128 avatar es128 commented on July 18, 2024

Ok, but you missed my first point. We do not maintain the Uglify library, just use it. You should try directly running Uglify on these scripts to see if there is a problem, and if so let the Uglify and/or library authors know about it.

It's only something for us to look into and fix if directly uglifying works, but through brunch it does not.

Or if you want the easy answer, just use the pre-minified versions provided by the library authors in your project.

from terser-brunch.

paulmillr avatar paulmillr commented on July 18, 2024

you can't

from terser-brunch.

paulmillr avatar paulmillr commented on July 18, 2024

or you can move it to app/assets and it will be simply copied

from terser-brunch.

kursion avatar kursion commented on July 18, 2024

Hello paulmillr, I deleted my comment since I find out that it was impossible (but you were to fast) :p
Ty guys

from terser-brunch.

es128 avatar es128 commented on July 18, 2024

Just try dropping in the pre-minified one. It will run through Uglify, but maybe it won't break that version.

On Aug 21, 2013, at 9:46 AM, kursion [email protected] wrote:

Hello paulmillr, I deleted my comment since I find out that it was impossible :p


Reply to this email directly or view it on GitHub.

from terser-brunch.

kursion avatar kursion commented on July 18, 2024

I tried both: first the non minified, then the minified version of RickShaw. Both failed...

from terser-brunch.

es128 avatar es128 commented on July 18, 2024

oh that sucks... well I think at this point dropping it in assets as @paulmillr suggested and making a separate <script> tag for it in your HTML will be your best bet.

And you should report this to https://github.com/mishoo/UglifyJS2

from terser-brunch.

mpellerin42 avatar mpellerin42 commented on July 18, 2024

Hi,
this is a known problem, as you can see in this Rickshaw issue: shutterstock/rickshaw#52

This comment shutterstock/rickshaw#52 (comment) provide a solution working for requireJS. I test it with brunch that way:

plugins: {
    uglify:{
        except: ["$super"]
    }
},

but it didn't work. Is except option managed by uglify-js-brunch plugin?

from terser-brunch.

es128 avatar es128 commented on July 18, 2024

All the options are passed through as-is https://github.com/brunch/uglify-js-brunch/blob/master/index.js#L53

So if it works directly with the uglify js api it should work here.

from terser-brunch.

mpellerin42 avatar mpellerin42 commented on July 18, 2024

Just tried this

plugins: {
    uglify:{
        mangle: false
    }
},

and it works just fine :)

Hope this workaround will be useful for others, cause it's better than put Rickshaw in asset folder.

from terser-brunch.

Related Issues (19)

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.