browserify-externalize icon indicating copy to clipboard operation
browserify-externalize copied to clipboard

Broken on latest browserify

Open Makio64 opened this issue 10 years ago • 6 comments

Hello epeli,

externalize looks broken with the latest browserify. I get this error error when I try the example code :

TypeError: Cannot call method 'bind' of undefined at BundleManager.resolveModules (/path/node_modules/externalize/index.js:37:44)

I check and the bundle object don't have _resolve property anymore, any clue to fix it?

Thanks

Makio64 avatar Feb 01 '15 09:02 Makio64

This module is not maintained anymore. Please try substack/factor-bundle instead.

esamattis avatar Feb 10 '15 09:02 esamattis

Thanks for your answer!

Yeah I tried it but it didn't allow async loading.

So I tried partition-bundle but didn't success to acheive what I want with the common part + async loading + an easy way to config all that..

At the end I switched to webpack witch provide all that features from the box, very happy with it :)

Here how it works : https://github.com/Makio64/Template-Modules

Cheers!

Makio64 avatar Feb 10 '15 10:02 Makio64

@epeli this is a shame, it's such a handy module. How hard would it be to fix? I've got it working by replacing _resolve with _bresolve and manually calling my callback after two seconds. So it's working except it's not calling the callback, I wonder why that is.

adam-lynch avatar Nov 05 '15 14:11 adam-lynch

To be clear, it's working with a simple module.exports = 'something' child module.

adam-lynch avatar Nov 05 '15 14:11 adam-lynch

No idea. I haven't followed how Browserify internals has evolved. This was written for 2.0 and the latest Browserify release is 12. That's quite a few major releases...

esamattis avatar Nov 05 '15 20:11 esamattis

@epeli good point. I think I'll give up :smile:. I think I might just create a new bundle without externalize, being careful about duplicate dependencies, and loading them on demand kinda like what you're doing except instead of requiring it, each module would have to add itself into a global which is already there. Down the line I might use factor-bundle or something.

adam-lynch avatar Nov 06 '15 10:11 adam-lynch