Answer the question
In order to leave comments, you need to log in
How to build a specific folder in typescript?
There are 2 folders - client && server . I use typescript both there and there , but the client works through webpack , and the server through the tsc command. The tsconfig.json file is generic. When I try to build the server, the files from the client are also taken . It turns out that the entire src folder is in dist , but I don’t need this. And if you set --rootDir in the config, then when working with webpack I get an error that the path to the files with client is not set .
File structure:
dist
src
--client
--server
tsconfig.json
webpack.config.json
"scripts": {
"prod": "SET \"NODE_ENV=production\" && webpack --mode production", // тут клиент
"build-server": "tsc --rootDir ./src/server" // тут ошибка (типа нету доступа к файлам с папки client)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question