I want to run my ts file which uses a npm package in Unity. Is there any way to do that?
Also required tsconfig compiler settings:
{
"compilerOptions": {
"target": "es2020",
"module": "es2022",
"lib": ["dom", "esnext"],
"outDir": "./build",
"rootDir": ".",
"strict": true,
"strictPropertyInitialization": false,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"allowJs": true,
"declaration": true,
"sourceMap": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true
},
"include": ["./src"]
}