Skip to content

Commit

Permalink
fix: slash runtime path (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Mar 8, 2024
1 parent ec53843 commit 1a3ac0b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 15 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -37,6 +37,7 @@
},
"dependencies": {
"consola": "^3.2.3",
"mlly": "^1.6.0",
"pkg-types": "^1.0.3"
},
"devDependencies": {
Expand Down
46 changes: 34 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/index.ts
@@ -1,6 +1,6 @@
import { fileURLToPath } from "node:url";
import { relative, resolve } from "node:path";
import { promises as fs } from "node:fs";
import { fileURLToPath } from "mlly";
import type { Nitro } from "nitropack";
import type { Nuxt } from "nuxt/schema";
import consola from "consola";
Expand Down Expand Up @@ -56,13 +56,13 @@ async function nitroModule(nitro: Nitro) {
// Make sure runtime is transpiled
nitro.options.externals.inline = nitro.options.externals.inline || [];
nitro.options.externals.inline.push(
fileURLToPath(new URL("runtime/", import.meta.url)),
fileURLToPath(new URL("runtime/", import.meta.url))
);

// Add plugin to inject bindings to dev server
nitro.options.plugins = nitro.options.plugins || [];
nitro.options.plugins.push(
fileURLToPath(new URL("runtime/plugin.dev", import.meta.url)),
fileURLToPath(new URL("runtime/plugin.dev", import.meta.url))
);
}

Expand Down

0 comments on commit 1a3ac0b

Please sign in to comment.