UNPKG

@inlang/paraglide-js

Version:

[![NPM Downloads](https://img.shields.io/npm/dw/%40inlang%2Fparaglide-js?logo=npm&logoColor=red&label=npm%20downloads)](https://www.npmjs.com/package/@inlang/paraglide-js) [![GitHub Issues](https://img.shields.io/github/issues-closed/opral/paraglide-js?lo

22 lines 680 B
export const detectBundler = async (ctx) => { const potentialViteConfigPaths = ["./vite.config.js", "./vite.config.ts"]; const viteConfigPath = await Promise.all(potentialViteConfigPaths.map(async (path) => ({ path, exists: await ctx.fs .access(path) .then(() => true) .catch(() => false), }))).then((results) => results.find((result) => result.exists)?.path); if (!viteConfigPath) { return { ...ctx, bundler: undefined, }; } return { ...ctx, bundler: "vite", configPath: viteConfigPath, }; }; //# sourceMappingURL=detect-bundler.js.map