"next dev" ignores imports with customConditions

It ignores tsconfig "customConditions" setting which i use to import from src on development. The whole idea of customContions is to do development on the source code, without the need to compile any other monorepo's package and make the app work properly run by nodejs after successful compilation. I can't see any SO or GH issues about that. Tried to fallback "import" section of package.json exports into source code and it works well. Application build with tsc & next export works well. Any idea how i can force nextjs to use "@source" exports during development?
//util's package.json
"exports": {
"./*": {
"@source": "./src/*.ts",
"import": "./dist/*.js"
},
}

//app's package.json
"dependencies": {
"@my/utils": "workspace:*",
...
}

//tsconfig.json
"compilerOptions": {
"customConditions": [
"@source"
],
...
}

//example import that fails
import { getUserSession } from "@my/utils/auth/index";
//util's package.json
"exports": {
"./*": {
"@source": "./src/*.ts",
"import": "./dist/*.js"
},
}

//app's package.json
"dependencies": {
"@my/utils": "workspace:*",
...
}

//tsconfig.json
"compilerOptions": {
"customConditions": [
"@source"
],
...
}

//example import that fails
import { getUserSession } from "@my/utils/auth/index";
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server