How to deal with optional dependencies ?
See original GitHub issueI’m using Backbone & Backbone.native (as a jQuery replacement). But with browserify, I’m having an issue just here
try { $ = require('jquery'); } catch(e) {}
I don’t want jQuery, so for now I just use this really dirty workaround:
mkdir ./node_modules/jquery && ln -s ../backbone.native/backbone.native.js ./node_modules/jquery/index.js
Any idea how to handle that ?
Issue Analytics
- State:
- Created 10 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
What are Optional Dependencies and when should we use them
When a dependency is made optional, your program is still responsible for handling its absence. Step 3: Make a new file “app.js” and...
Read more >Maven – Optional Dependencies and Dependency Exclusions
Optional dependencies are used when it's not possible (for whatever reason) to split a project into sub-modules. The idea is that some of...
Read more >What Are NPM's Optional Dependencies and When Should ...
Execute npm install someDependency --save-optional to install a package as an optional dependency. · When you want to avoid installing optional ...
Read more >Optional Dependency in Maven | Baeldung
As we're going to see we can include the <optional> element with a value of true to make any Maven dependency optional.
Read more >java - Best strategy for dealing with optional dependencies
Best strategy for dealing with optional dependencies · Ease of use for end-users (minimum work required to use functionality if dependency is ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dy There is an
--ignore-missing
flag:@goto-bus-stop as far as I get there is no way to set flags in “browserify” field, right? Is there any sense in transform, forwarding its flags to browserify?