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

Browserifying a single file with noParse does not work #504

Closed
devmanhinton opened this issue Oct 17, 2013 · 1 comment
Closed

Browserifying a single file with noParse does not work #504

devmanhinton opened this issue Oct 17, 2013 · 1 comment

Comments

@devmanhinton
Copy link

Not sure if this is silly, but I am simply trying to browserify a file (/many files) so
that they can be required client_side. I was trying to does this via combination of

var b = browersify(fileName, {noParse: fileName})
b.require(fileName, {expose: name}

However, noParse is NOT respected when the first arg is a string.


var b = browserify(files=[] or opts={})

Create a browserify instance b from the entry main files or opts.entries. files can be an array of files or a single file.

You can also specify an opts.noParse array which will skip all require() and global parsing for each file in the array. Use this for giant libs like jquery or threejs that don't have any requires or node-style globals but take forever to parse.

opts.extensions is an array of optional extra extensions for the module lookup machinery to use when the extension has not been specified. By default browserify considers only .js and .json files in such cases.

Note that if files do not contain javascript source code then you also need to specify a corresponding transform for them.

@ghost
Copy link

ghost commented Jan 30, 2014

Fixed in 3.24.7 along with some other fixes for noParse related to the insert-module-globals changes.

@ghost ghost closed this as completed Jan 30, 2014
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