Questions tagged [browserify-shim]
117 questions
37
votes
4 answers
Browserify with twitter bootstrap
There are many similar questions including answers here on stack overflow, but none of them have worked for me, so here I am asking you guys. I appreciate everyone's time.
I recently started using gulp with browserify, and that works great.
I then…

rob.luton
- 395
- 1
- 4
- 7
16
votes
3 answers
Using browserify with npm jQuery and non-npm plugins
I am using browserify to bundle front-end code. It's been great so far, but I've been having difficulty mixing npm and non npm packages. For example, using the npm version of jQuery with non CJS versions of jQuery plugins.
My current solution is to…

Nick Tomlin
- 28,402
- 11
- 61
- 90
10
votes
1 answer
How should project-level bundling be handled for non SPA use?
I am learning browserify and I am trying to do two basic things with it:
Transform (via shim) non-CommonJS modules for ease-of-use and dependency tracking
Bundle the libraries that are project-specific
I've found a working process for how to do…

Carrie Kendall
- 11,124
- 5
- 61
- 81
10
votes
1 answer
Browserify - How to include non-public purchased third party scripts
I am new to browserify and its usage is not completely clear to me although the benefits seem to be compelling.
I have a couple of questions and was hoping someone could clarify.
I've seen blog posts about using browserify-shim in the package.json…

sat
- 5,489
- 10
- 63
- 81
10
votes
1 answer
Using Browserify with jQuery Plugins
Some brief background: I'm using browserify and browserify-shim (and gulp to build) to create a web app. Prior to this issue, I was requireing jquery from npm so I had no issues. Once I started doing some optimization, I realized how massive the…

Chetan Shenoy
- 843
- 1
- 10
- 19
7
votes
1 answer
How to test files that use browserify-shim global's in Jest?
I'm downloading the google maps API v3 via a script tag, and I'm adding the dependency to my modules with the following (relevant) package.json configuration:
"browserify-shim": {
"google": "global:google"
}
And I can add the dependency in my…

aleandros
- 196
- 1
- 7
7
votes
2 answers
Shimming dependencies of dependencies with browserify-shim
I'm trying to refactor a library that uses Browserify by shimming certain modules out of the bundle using browserify-shim. Specifically, the library uses require("codemirror") but I want to provide a bundle that doesn't include CodeMirror but will…

Ethan Jewett
- 6,002
- 16
- 25
6
votes
1 answer
browserify-shim not exporting implicit globals when they are var scoped
According to the browserify-shim docs, you can specify which globals browserify-shim needs to expose from your legacy modules by using the following syntax in your package.json:
{
"browserify-shim": {
"legacyModule": "myVar"
}
}
I…

Brian FitzGerald
- 3,041
- 3
- 28
- 38
6
votes
1 answer
grunt browserify react requiring jquery
Using latest node and Grunt 0.4.x, react 0.10.x
What to via Grunt execute browserify on React JSX files that have requires on jquery in them:
var $ = require('jquery');
Tried moving the shim transformation into the package.json after reading about…

Matthew Campbell
- 1,864
- 3
- 24
- 51
5
votes
0 answers
How to Browserify-Shim Angular 2?
Anyone know how to Browserify-Shim Angular 2, while keeping Angular external and not bundling it in the build?
//package.json
{
"name": "testapp",
"version": "1.0.0",
"main": "./app.js",
"browserify-shim": {
"angular2":…

wayofthefuture
- 8,339
- 7
- 36
- 53
5
votes
1 answer
Fake global jQuery with browserify-shim? (Cannot find module 'jquery')
I'm encountering a puzzling issue with Browserify, regarding jQuery plugins. As I have multiple bundles for separate sub-apps, I have some global libraries as