File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -66,4 +66,10 @@ module.exports = {
66
66
] ,
67
67
individual : [ ] ,
68
68
} ,
69
+ extraTwigNamespaces : {
70
+ 'bolt-assets' : {
71
+ recursive : true ,
72
+ paths : [ '../../www/build' ] ,
73
+ } ,
74
+ } ,
69
75
} ;
Original file line number Diff line number Diff line change 12
12
{% set hasSidebar = nestedPages or sidebar %}
13
13
{# End Global Twig vars #}
14
14
15
+ {% set manifestConfigFile = " @bolt-assets/bolt-webpack-manifest#{bolt.data.config.lang ? " -" ~ bolt.data.config.lang[0] : " " }.json" %}
16
+ {% if fileExists(manifestConfigFile ) %}
17
+ {% set assets = get_data(manifestConfigFile ) %}
18
+ {% else %}
19
+ {% set assets = [] %}
20
+ {% endif %}
21
+
15
22
16
23
<!DOCTYPE html>
17
24
<html lang =" en-US" class =" {{ bolt .data .config .prod ? ' ' : ' js-fonts-loaded' }}" >
37
44
38
45
<!-- async load PL's CSS -->
39
46
<link rel =" preload" href =" /pattern-lab/styleguide/css/pattern-lab.css" as =" style" onload =" this.rel='stylesheet'" >
40
- <link rel =" stylesheet" href =" {{ assets [" bolt-global.css" ] | default(" /pattern-lab/build/bolt-global.css" ) }}" media =" all" />
41
-
47
+ <link rel =" preload" as =" style" href =" {{ assets [" bolt-global.css" ] | default(" /build/bolt-global.css" ) }}" onload =" this.onload=null;this.rel='stylesheet'" />
42
48
<noscript >
43
49
<link href =" /pattern-lab/styleguide/css/pattern-lab.css" rel =" stylesheet" >
50
+ <link rel =" stylesheet" href =" {{ assets [" bolt-global.css" ] | default(" /build/bolt-global.css" ) }}" />
44
51
</noscript >
45
52
46
53
156
163
})();
157
164
< / script> #}
158
165
{% endif % }
166
+ < script src= " {{ assets[" bolt- global .js " ] | default(" / build/ bolt- global .js " ) }}" async >< / script>
159
167
< / body>
160
168
< / html>
You can’t perform that action at this time.
0 commit comments