Install Locator on Svelte codebase.
npm install -D @locator/runtime
Add this to some global/root file, usually:index.js or App.svelteimport setupLocatorUI from "@locator/runtime";
if (process.env.NODE_ENV === "development") {
setupLocatorUI({
adapter: "svelte",
projectPath: __PROJECT_PATH__,
});
}
and add this to your vite.config.jsexport default defineConfig({
...
define: {
__PROJECT_PATH__: `"${process.cwd()}/"`,
},
...
});