File tree Expand file tree Collapse file tree 3 files changed +23
-9
lines changed Expand file tree Collapse file tree 3 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,25 @@ <h1>Preparing to run your test</h1>
3737 } else if ( browser ) {
3838 urls = scripts . map ( script => ( browser . runtime . getURL ( script ) ) ) ;
3939 }
40- urls . forEach ( url => {
41- var e = document . createElement ( "script" ) ;
42- e . src = url ;
43- document . body . appendChild ( e ) ;
44- } ) ;
40+
41+ function loadScript ( url ) {
42+ return new Promise ( res => {
43+ var e = document . createElement ( "script" ) ;
44+ e . type = "text/javascript" ;
45+ e . async = true ;
46+ e . onload = res ;
47+ e . src = url ;
48+ document . body . appendChild ( e ) ;
49+ } ) ;
50+ }
51+
52+ ( function loadAll ( i ) {
53+ loadScript ( urls [ i ] ) . then ( ( ) => {
54+ const n = i + 1 ;
55+ if ( n < urls . length ) {
56+ loadAll ( n ) ;
57+ }
58+ } ) ;
59+ } ) ( 0 ) ;
4560 </ script >
4661</ html >
Original file line number Diff line number Diff line change 4242 " assets/highlight.css" ,
4343 " assets/bootstrap.html"
4444 ],
45- "content_security_policy" : " script-src 'self' 'sha256-RrWdu6/4gs/mcl8IXNkrSzFeGzDCH3E5vNKtAfUtphw =' 'unsafe-eval'; object-src 'self'" ,
45+ "content_security_policy" : " script-src 'self' 'sha256-W7QWmGne6B9hjKtOqoGmUFOPgpFcUo4Nr/yyMqtgXcU =' 'unsafe-eval'; object-src 'self'" ,
4646 "content_scripts" : [
4747 {
4848 "matches" : [
6666 " assets/background.js"
6767 ]
6868 }
69- }
69+ }
Original file line number Diff line number Diff line change @@ -273,8 +273,7 @@ export default {
273273 } ) ,
274274 new webpack . optimize . CommonsChunkPlugin ( {
275275 name : "atoms" ,
276- chunks : [ "record" , "playback" ] ,
277- minChunks : Infinity
276+ chunks : [ "record" , "playback" ]
278277 } ) ,
279278 // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
280279 new ExtractTextPlugin ( {
You can’t perform that action at this time.
0 commit comments