Skip to content

Commit

Permalink
Fix/root index (#158)
Browse files Browse the repository at this point in the history
root index is not load. This fix the problem
  • Loading branch information
CordlessWool authored Oct 26, 2024
2 parents 63e1766 + ded6347 commit 3710c26
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/create-embodi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-embodi",
"version": "0.3.3",
"version": "0.3.4",
"description": "",
"main": "index.js",
"bin": "./bin.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "embodi preview"
},
"devDependencies": {
"embodi": "^0.8.0",
"embodi": "^0.8.2",
"svelte": "^5.1.0"
}
}
2 changes: 1 addition & 1 deletion packages/embodi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "embodi",
"version": "0.8.1",
"version": "0.8.2",
"license": "Apache-2.0",
"module": "dist/exports/lib.js",
"types": "dist/exports/lib.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/embodi/src/core/vite/utils/load-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const transformPathToUrl = (dir: Directory, file: LoomFile) => {
}

if (file.getNameWithoutExtension() === 'index') {
return `/${dir.relativePath(file.dir)}`;
return `/${dir.relativePath(file.dir) ?? ''}`;
}
const relativePath = dir.relativePath(file)!;
return `/${relativePath.slice(0, -(extension.length + 1))}`;
Expand Down

0 comments on commit 3710c26

Please sign in to comment.