chore: compatible for nodejs dirname
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user