-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: option `parsePages` * chore: update lock file * test: update * ci: update branch
- Loading branch information
1 parent
73b2ee3
commit 4ebf7e6
Showing
11 changed files
with
556 additions
and
515 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { setupTest, get } from '@nuxt/test-utils' | ||
|
||
describe('disable-parse-pages', () => { | ||
setupTest({ | ||
server: true, | ||
fixture: 'fixture/disable-parse-pages' | ||
}) | ||
|
||
test('render', async () => { | ||
const { body } = await get('/') | ||
expect(body).toContain('Hello server') | ||
}) | ||
|
||
test('disable pages', async () => { | ||
await expect(get('/foo')).rejects.toThrow('Not Found') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<template> | ||
<h1>Hello {{ name }}</h1> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
asyncData () { | ||
return { | ||
name: process.client ? 'client' : 'server' | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default { | ||
rootDir: __dirname, | ||
buildModules: [ | ||
'../../../src/module.ts' | ||
], | ||
routerModule: { | ||
keepDefaultRouter: true, | ||
parsePages: false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<h1>foo</h1> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Router from 'vue-router' | ||
import MyPage from '~/components/my-page' | ||
|
||
export function createRouter (ssrContext, createDefaultRouter, routerOptions) { | ||
const options = routerOptions || createDefaultRouter(ssrContext).options | ||
|
||
return new Router({ | ||
...options, | ||
routes: [ | ||
{ | ||
path: '/', | ||
component: MyPage | ||
} | ||
] | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.