Skip to content

Commit

Permalink
feat(storage): default data storage for node and dev presets (#1352)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jun 30, 2023
1 parent 35e5ba2 commit 1d0c120
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/options.ts
Expand Up @@ -346,6 +346,23 @@ export async function loadOptions(
};
}

// Runtime storage
if (
options.dev &&
options.storage.data === undefined &&
options.devStorage.data === undefined
) {
options.devStorage.data = {
driver: "fs",
base: resolve(options.rootDir, ".data/kv"),
};
} else if (options.node && options.storage.data === undefined) {
options.storage.data = {
driver: "fs",
base: "./.data/kv",
};
}

// Resolve plugin paths
options.plugins = options.plugins.map((p) => resolvePath(p, options));

Expand Down

0 comments on commit 1d0c120

Please sign in to comment.