Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to NOT generate any shim? #803

Closed
zhanzhenzhen opened this issue Jun 25, 2014 · 1 comment
Closed

How to NOT generate any shim? #803

zhanzhenzhen opened this issue Jun 25, 2014 · 1 comment

Comments

@zhanzhenzhen
Copy link

It seems that even if I use --bare option it still generates shims like "process shim", if your code contains "process". But I don't want it, because my "process" code is already in an "if" condition won't be run if browser is detected. Is there any way to get rid of any shim and make the output super clean?

@ghost
Copy link

ghost commented Jul 24, 2014

Should be fixed in 5.0.5:

$ echo "console.log(process)" | browserify --bare -
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
console.log(process)

},{}]},{},[1]);

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant