I'm trying to get my typescript project to build. It has built successfully in the past with the same settings, but now it's not building even though it isn't showing any errors. I run:
npx tsc -p tsconfig.json
Where my tsconfig.json
is:
{
"pilerOptions": {
"module": "ES6",
"target": "ES6",
"declaration": true,
"outDir": "./lib",
"strict": true,
"jsx": "react-native",
"skipLibCheck": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
},
"include": [
"src/**/*"
],
"extends": "expo/tsconfig.base"
}
No lib
folder is produced at all.
My src
folder contains several typescript files, as well as an index that exports the required ponents.
I'm really confused because my project structure and settings haven't changed at all yet tsc
is no longer producing the outDir
or any of the files when it worked before.
I'm trying to get my typescript project to build. It has built successfully in the past with the same settings, but now it's not building even though it isn't showing any errors. I run:
npx tsc -p tsconfig.json
Where my tsconfig.json
is:
{
"pilerOptions": {
"module": "ES6",
"target": "ES6",
"declaration": true,
"outDir": "./lib",
"strict": true,
"jsx": "react-native",
"skipLibCheck": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
},
"include": [
"src/**/*"
],
"extends": "expo/tsconfig.base"
}
No lib
folder is produced at all.
My src
folder contains several typescript files, as well as an index that exports the required ponents.
I'm really confused because my project structure and settings haven't changed at all yet tsc
is no longer producing the outDir
or any of the files when it worked before.
1 Answer
Reset to default 5Expo is using typescript
for typechecking only. Bundling files is done with Metro bundler. Thus expo/tsconfig.base
has noEmit
option set to true
.
If you want to pile js
files yourself you have to either run you mand as:
npx tsc -p tsconfig.json --noEmit false
or to set noEmit
option to false
in your tsconfig.json
. Don't forget to remove it back in you tsconfig
. Or next time on build expo
will run both metro
bundling and tsc typecheck and tsc pilation.
As the last resort you may stop extending expo/tsconfig.base
in your tsconfig.json
. But do this only if you really know what you're doing.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744860606a4597677.html
评论列表(0条)