Code Monkey home page Code Monkey logo

Comments (10)

jmreidy avatar jmreidy commented on August 27, 2024

Hey @rpflorence! Cool to see you're using grunt-browserify!

As of right now, browserify-shim requires the libraries being shimmed to be parsed. I'm going to leave this ticket open, though, as a reminder to update the documentation to specify this limitation.

from grunt-browserify.

jmreidy avatar jmreidy commented on August 27, 2024

And if you're looking for faster build times, I'd just suggest moving the shimmed libraries into a separate vendor subtask, so that you don't need to recompile on every client code change.

from grunt-browserify.

JonET avatar JonET commented on August 27, 2024

@jmreidy I was able to make this situation work in mimosa-browserify by creating a transform that inserts var global=self; before the shim when the file is configured to be both shimmed and noParsed.

index.coffee#L84-L98

from grunt-browserify.

jmreidy avatar jmreidy commented on August 27, 2024

@JonET Interesting! Do you know if this approach would still work for libraries that need to be shimmed with outside dependencies?

from grunt-browserify.

JonET avatar JonET commented on August 27, 2024

Seems to be resolving things okay. (conifg)
image

from grunt-browserify.

jmreidy avatar jmreidy commented on August 27, 2024

Awesome! I'll merge this in. Thanks @JonET!

from grunt-browserify.

JonET avatar JonET commented on August 27, 2024

That screenshot isn't right (global.$ is defined before the require('jquery') call). But Handlebars wasn't. So yep, it works.

from grunt-browserify.

jmreidy avatar jmreidy commented on August 27, 2024

For anyone that is experiencing this problem, could you try the fix_noParse_shim branch at b35b8af?

from grunt-browserify.

jmreidy avatar jmreidy commented on August 27, 2024

Published in v1.2.7

from grunt-browserify.

ndreckshage avatar ndreckshage commented on August 27, 2024

thanks for this code snippet! was trying to find nice way to handle the ember suite

from grunt-browserify.

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.