javascript - Chrome Extensions Bloated Background Page -


is there technique break down or modularize background page in chrome extension? go on developing extension of javascript in background page , since it's long lasting running script of extension (the minority of javascript in popup.js , content scripts). wanted know developers - accept big background.js file? ideally "include" different js files containing data or objects , include them background.js not possible in javascript .

any advice ?

instead of specifying background script, can specify own background page, see http://developer.chrome.com/extensions/background_pages.html docs. such background page allows load number of scripts using regular script tags, or other techniques. when specify background script instead of background page, default background page (with 1 script tag pointing script) generated you.

you script loaders requirejs.

i'm developing extension using commonjs modules (i.e. style used in node.js) compiled browserify, combines modules 1 big file. works me.


Comments

Popular posts from this blog

c - sscanf() double showing zeros -

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -