MCPcopy Create free account
hub / github.com/effect-app/libs / makeConfig

Function makeConfig

vite.config.base.ts:15–40  ·  view source on GitHub ↗
(dirName?: string)

Source from the content-addressed store, hash-verified

13// })
14
15export default function makeConfig(dirName?: string) {
16 const prefix = path.resolve(__dirname, "packages")
17 const packages = fs.readdirSync(prefix).map((f) => prefix + "/" + f).filter((f) => fs.lstatSync(f).isDirectory())
18 const cfg = {
19 // eslint-disable-next-line @typescript-eslint/no-var-requires
20 // plugins: [autoImport],
21 test: {
22 include: ["./test/**/*.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
23 exclude: ["./test/dist"],
24 reporters: "verbose",
25 globals: true,
26 setupFiles: [path.join(__dirname, "vitest.setup.ts")]
27 },
28 resolve: {
29 alias: packages.map((pkg) => ({ pkg, json: pkg + "/package.json" })).filter((_) => fs.existsSync(_.json)).reduce(
30 (acc, { pkg, json }) => {
31 acc[JSON.parse(fs.readFileSync(json, "utf-8")).name] = path.resolve(pkg, "src")
32 return acc
33 },
34 {}
35 ) // "effect-app/Prelude": path.join(__dirname, "packages/core/src/Prelude.code.ts")
36 }
37 }
38 // console.log(cfg)
39 return cfg
40}

Callers 5

vitest.config.tsFile · 0.50
vitest.config.tsFile · 0.50
vitest.config.tsFile · 0.50
vitest.config.tsFile · 0.50
vitest.config.tsFile · 0.50

Calls 4

filterMethod · 0.80
joinMethod · 0.80
parseMethod · 0.80
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…