lasso-js / lasso

Advanced JavaScript module bundler, asset pipeline and optimizer
581 stars 75 forks source link

DependencyRegistry has an undefined stream when using `mask-define` for AMD dependencies #185

Closed CestDiego closed 7 years ago

CestDiego commented 7 years ago

I have this in my browser.json, according to docs this is the way to do it.

 {
            "path": "../../../node_modules/clipboard/dist/clipboard.js",
            "mask-define": true
}

When running tests though, I stumble across this:

/Users/user/path/to/project-name/node_modules/lasso/lib/dependencies/DependencyRegistry.js:629
                    .on('data', function(data) {

It looks that stream is undefined here: https://github.com/lasso-js/lasso/blob/e760f877230a2a4f27d6664ba4ce9e67c26355b7/lib/dependencies/DependencyRegistry.js#L628

and this function is the one that doesn't give back a stream when mask-define is used: https://github.com/lasso-js/lasso/blob/e760f877230a2a4f27d6664ba4ce9e67c26355b7/lib/dependencies/dependency-resource.js#L57-L66

patrick-steele-idem commented 7 years ago

New version published with fix: lasso@2.8.4

Thanks for reporting the problem.