stealjs / steal-tools

Build easy. Load fast.
https://stealjs.com/docs/steal-tools.html
MIT License
67 stars 23 forks source link

process object needs to be available #1024

Closed justinbmeyer closed 6 years ago

justinbmeyer commented 6 years ago

If a global build depends on process, steal will load fine during development b/c the npm plugin adds process:

        g.process = {
            argv: [],
            cwd: function(){
                var baseURL = loader.baseURL;
                return baseURL;
            },
            browser: true,
            env: {
                NODE_ENV: loader.env
            },
            version: '',
            platform: (navigator && navigator.userAgent && /Windows/.test(navigator.userAgent)) ? "win" : ""
        };

But this is not added by the global build.

Should this be detected? Or optional?