mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-14 12:04:39 +00:00
once more, with feeling
This commit is contained in:
@@ -4,10 +4,10 @@ import { locations } from '../config';
|
|||||||
import { Page, PageComponent, ServerRoute } from '../interfaces';
|
import { Page, PageComponent, ServerRoute } from '../interfaces';
|
||||||
import { posixify } from './utils';
|
import { posixify } from './utils';
|
||||||
|
|
||||||
const fallback_index = path.resolve(
|
const fallback_index = posixify(path.resolve(
|
||||||
__dirname,
|
__dirname,
|
||||||
'../fallback.html'
|
'../fallback.html'
|
||||||
);
|
));
|
||||||
|
|
||||||
export default function create_routes(cwd = locations.routes()) {
|
export default function create_routes(cwd = locations.routes()) {
|
||||||
const components: PageComponent[] = [];
|
const components: PageComponent[] = [];
|
||||||
@@ -100,7 +100,7 @@ export default function create_routes(cwd = locations.routes()) {
|
|||||||
const component = fs.existsSync(index)
|
const component = fs.existsSync(index)
|
||||||
? {
|
? {
|
||||||
name: `page_${get_slug(item.file)}`,
|
name: `page_${get_slug(item.file)}`,
|
||||||
file: path.join(item.file, 'index.html')
|
file: `${item.file}/index.html`
|
||||||
}
|
}
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user