1
0
mirror of synced 2025-11-06 04:20:50 +08:00

chore: compatible for nodejs dirname

This commit is contained in:
YunYouJun
2025-10-07 18:29:47 +08:00
parent 914502a440
commit cf77e12220

View File

@@ -1,6 +1,7 @@
import path from 'node:path'
import path, { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
const __dirname = import.meta.dirname
const __dirname = dirname(fileURLToPath(import.meta.url))
const recipeCsvFile = path.resolve(__dirname, '../app/data/recipe.csv')
const recipeJsonFile = path.resolve(__dirname, '../app/data/recipe.json')
const incompatibleFoodsCsvFile = path.resolve(__dirname, '../app/data/incompatible-foods.csv')