@wervt/nitro 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,8 @@ import { BUNDLE_MANIFEST } from "@wervt/core";
|
|
|
6
6
|
import { SEED_TASK, resolveAppName, setupDev, unscheduleSeed } from "@wervt/platform/dev";
|
|
7
7
|
// src/index.ts
|
|
8
8
|
const ext = import.meta.url.endsWith(".ts") ? ".ts" : ".js";
|
|
9
|
-
const
|
|
9
|
+
const runtimeDir = fileURLToPath(new URL("./runtime/", import.meta.url));
|
|
10
|
+
const runtime = (name) => `${runtimeDir}${name}${ext}`;
|
|
10
11
|
/** The module, configured: `modules: [wervt({ timezone: 'Europe/Berlin' })]`. */
|
|
11
12
|
function wervt(options = {}) {
|
|
12
13
|
const module = {
|
|
@@ -40,6 +41,7 @@ async function setup(nitro, options) {
|
|
|
40
41
|
method: "GET",
|
|
41
42
|
handler: runtime("user")
|
|
42
43
|
});
|
|
44
|
+
if (nitro.options.noExternals !== true) nitro.options.noExternals = [...nitro.options.noExternals || [], runtimeDir];
|
|
43
45
|
if (dev) {
|
|
44
46
|
if (!process.env.NITRO_PRERENDER) await setupDevServer(nitro, app, options.dev ?? {});
|
|
45
47
|
return;
|