You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bundle:dependencies uses the basename of the main file when determining location and standalone name. But some modules keep their main JavaScript in a subfolder, e.g.: async has async/lib/async.js, js-csp has js-csp/src/csp.js.
The text was updated successfully, but these errors were encountered:
I fixed the issue locally by finding the actual main of the file, and using the basename only for the standalone, e.g:
gulp.task('bundle:dependencies',function(){[..]// create a list of dependencies' main filesvarmodules=dependencies.map(function(dep){varpackageJson=require(dep+'/package.json');varmain;if(!packageJson.main){main=['index.js'];}elseif(Array.isArray(packageJson.main)){main=packageJson.main;}else{main=[packageJson.main];}return{name: dep,main: main.map(function(it){returnit})};// skip basename here});[..]// create bundle file and minify for each main filesmodules.forEach(function(it){it.main.forEach(function(entry){varb=browserify('node_modules/'+it.name+'/'+entry,{detectGlobal: false,standalone: path.basename(it.name)// basename here});[..]});[..]});[..]});
bundle:dependencies
uses the basename of the main file when determining location and standalone name. But some modules keep their main JavaScript in a subfolder, e.g.: async hasasync/lib/async.js
, js-csp hasjs-csp/src/csp.js
.The text was updated successfully, but these errors were encountered: