mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
consolidate build scripts, reorganize source into src/ directory, fix favicon injection
This commit is contained in:
18
src/shims/path.js
Normal file
18
src/shims/path.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Path shim. delegates to path-browserify (bundled via esbuild alias)
|
||||
// Configured for posix mode since vault paths are normalized to forward slashes.
|
||||
|
||||
import pathBrowserify from "path";
|
||||
|
||||
const _origBasename = pathBrowserify.basename;
|
||||
|
||||
export const pathShim = {
|
||||
...pathBrowserify,
|
||||
basename(p, ext) {
|
||||
// Vault root "/" should return the vault name for display purposes
|
||||
if (p === "/" && window.__currentVaultId) {
|
||||
return window.__currentVaultId;
|
||||
}
|
||||
|
||||
return _origBasename(p, ext);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user