Getting this error:
"import.meta" is not available in the configured target environment ("es2017") and will be empty [empty-import-meta]
I have developed extension in directus project. Because I am importing the file from api/src/services
because of that now I am getting this error.
My file structure:
project-root/
├── api/
│ ├── extensions/
│ │ └── getallproducts/
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ └── ...
│ │ ├── tsconfig.json
│ │ └── ...
├── src
└── ...
My tsconfig.json
code:
{
"compilerOptions": {
"target": "ES2019",
"lib": ["ES2019", "DOM"],
"moduleResolution": "node",
"strict": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUncheckedIndexedAccess": true,
"noUnusedParameters": true,
"alwaysStrict": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"resolveJsonModule": false,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
"rootDir": "../../src",
},
"include": ["./src/**/*.ts"]
}
Want to get rid of import-meta error.