File tree Expand file tree Collapse file tree 3 files changed +21
-10
lines changed
Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,7 @@ const meta = [
3333 href : '/humans.txt' ,
3434 } ,
3535 ]
36- , script = [
37- {
38- once : true ,
39- hid : 'keep-me' ,
40- src : '/scripts/keep-me.js' ,
41- class : 'nuxt-prune--keep' ,
42- async : true ,
43- defer : true ,
44- } ,
45- ]
36+ , script = [ ]
4637;
4738
4839export default {
Original file line number Diff line number Diff line change @@ -14,6 +14,16 @@ const BASE_URL = '/';
1414
1515config . dev = false ;
1616config . router . base = BASE_URL ;
17+ config . head . script && config . head . script . push (
18+ {
19+ once : true ,
20+ hid : 'keep-me' ,
21+ src : '/scripts/keep-me.js' ,
22+ class : 'nuxt-prune--keep' ,
23+ async : true ,
24+ defer : true ,
25+ } ,
26+ ) ;
1727
1828// New features
1929config . pruneHtml = {
Original file line number Diff line number Diff line change @@ -14,6 +14,16 @@ const BASE_URL = '/';
1414
1515config . dev = false ;
1616config . router . base = BASE_URL ;
17+ config . head . script && config . head . script . push (
18+ {
19+ once : true ,
20+ hid : 'keep-me' ,
21+ src : '/scripts/keep-me.js' ,
22+ class : 'nuxt-prune--keep' ,
23+ async : true ,
24+ defer : true ,
25+ } ,
26+ ) ;
1727
1828// New features
1929config . pruneHtml = {
You can’t perform that action at this time.
0 commit comments