calvinmetcalf / rollup-plugin-node-builtins

138 stars 40 forks source link

global is not defined #36

Closed bertday closed 6 years ago

bertday commented 6 years ago

I'm using rollup-plugin-node-builtins because I use the url Node built-in and need to access it in the browser. So far I'm getting an error:

Uncaught ReferenceError: global is not defined

Here is a link to my compiled code which will take you to the line that's erroring: https://gist.github.com/rbrtmrtn/1c4f47ffda1ecb76e0efb36509de65be#file-gistfile1-txt-L5701

Here is my Rollup config: https://github.com/CityOfPhiladelphia/mapboard/blob/rollup/rollup.config.js

I've been digging into this for hours and can't figure out what's going wrong as to why global is missing. Any insights would be much appreciated.

calvinmetcalf commented 6 years ago

you need the node-globals plugin plugin too, consult this project's readme for which of the modules need global installed.

bertday commented 6 years ago

Oh duh, I missed that somehow. Thanks @calvinmetcalf!