Skip to content

Conversation

@youngjay
Copy link

I use browserify in windows, and run the code like following.

var b = new browserify({
    bundleExternal: false
});

b.add('./app.js');
b.bundle().pipe(fs.createWriteStream('dist/app.js'));

But browserfiy create an empty content js file.

After a long time debuging, I found the following code in 'Browserify.prototype._resolve'

    if (!self._bundleExternal && id[0] !== '/' && id[0] !== '.') {
        return cb(null, excludeModulePath);
    }

I think it is proposed to recorgnize the the path for external bundle when the path is like "lodash" or "jquery/ui".
But in windows, the result of resolve('./app.js') is 'd:\xxx\app.js'. The resolve method also recorgize it as an external module, and ignore it!

must include manual added files
@frankwallis
Copy link

I also have this issue on Windows, thanks for the fix. Can this pull request be merged please?

@goto-bus-stop
Copy link
Member

This was addressed in #948. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants