Unverified Commit 918025f4 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #1991 from hypothesis/fix-hammerjs-error

Fix Hammer.JS error on web pages that use Require.JS
parents a137343e 45d74682
......@@ -87,11 +87,19 @@ module.exports = function createBundle(config, buildOpts) {
// modules provide the implementations of these.
builtins: ['console', '_process', 'querystring'],
externalRequireName,
// Map of global variable names to functions returning _source code_ for
// the values of those globals.
insertGlobalVars: {
// Workaround for Hammer.JS on pages that use RequireJS. Hammer doesn't
// set `module.exports` if a global variable called `define` exists.
define: () => 'undefined',
// The Browserify polyfill for the `Buffer` global is large and
// unnecessary, but can get pulled into the bundle by modules that can
// optionally use it if present.
Buffer: undefined,
// Override the default stub for the `global` var which defaults to
// the `global`, `self` and `window` globals in that order.
//
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment