I can't figure out how to pass insertGlobalVars through browserify-middleware. Can you help me figure this out? I'll submit a documentation patch one way or another.
I have some values that my node server knows about, and I'd like to bundle them into JavaScript.
In a simple script with plain old browserify, this works, bundling the module in the 'clientApp' directory.
However, the globals are not included in the resulting file.
I've resorted to tracing it all the way through to insert-module-globals, but it's confusing, since I'm not really sure what the correct behavior would be.
I've tried setting insertGlobalVars in the browserify.settings, but that doesn't seem to change anything.
I can't figure out how to pass
insertGlobalVars
throughbrowserify-middleware
. Can you help me figure this out? I'll submit a documentation patch one way or another.I have some values that my node server knows about, and I'd like to bundle them into JavaScript.
In a simple script with plain old
browserify
, this works, bundling the module in the 'clientApp' directory.I expected this, with
browserify-middleware
to give a similar result. It's part of a longer handler, but this is roughly what it's doing:However, the globals are not included in the resulting file.
I've resorted to tracing it all the way through to
insert-module-globals
, but it's confusing, since I'm not really sure what the correct behavior would be.I've tried setting
insertGlobalVars
in thebrowserify.settings
, but that doesn't seem to change anything.