Skip to content

Commit

Permalink
fix: test for use-cases
Browse files Browse the repository at this point in the history
  • Loading branch information
LuXDAmore committed Jan 26, 2021
1 parent 7a02ef1 commit c5a3c08
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
11 changes: 1 addition & 10 deletions example/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,7 @@ const meta = [
href: '/humans.txt',
},
]
, script = [
{
once: true,
hid: 'keep-me',
src: '/scripts/keep-me.js',
class: 'nuxt-prune--keep',
async: true,
defer: true,
},
]
, script = []
;

export default {
Expand Down
10 changes: 10 additions & 0 deletions test/module-headers-override.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ const BASE_URL = '/';

config.dev = false;
config.router.base = BASE_URL;
config.head.script && config.head.script.push(
{
once: true,
hid: 'keep-me',
src: '/scripts/keep-me.js',
class: 'nuxt-prune--keep',
async: true,
defer: true,
},
);

// New features
config.pruneHtml = {
Expand Down
10 changes: 10 additions & 0 deletions test/module-keep-scripts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ const BASE_URL = '/';

config.dev = false;
config.router.base = BASE_URL;
config.head.script && config.head.script.push(
{
once: true,
hid: 'keep-me',
src: '/scripts/keep-me.js',
class: 'nuxt-prune--keep',
async: true,
defer: true,
},
);

// New features
config.pruneHtml = {
Expand Down

0 comments on commit c5a3c08

Please sign in to comment.