Open maxxporoshin opened 5 years ago
Having same question.
My project sructure would be
front
--index1.ts
--tsconfig.json
server
--index2.ts
--tsconfig.json
index.ts
webpack.config.js
Trying to use configFileName
but it does not work:
plugins: [
new TsConfigPathsPlugin({
configFileName: path.join(__dirname, '/front/tsconfig.json'),
}),
...
Hello guys!
Switched from
ts-loader
and run into inconvenience with typescript config files.The problem is that config file is searched in the root directory for each
entry
despite its path.The question is is it possible to make
awesome-typescript-loader
search config in the resource directory likets-loader
does?Example:
Some directories in the project have their own
tsconfig.json
and each of them has corresponding entry point in thewebpack
config (or configs). To makeawesome-typescript-loader
use the right config, you have to specify config path for everyentry
which often means duplication ofmodule
/module.rules
options.Project structure:
webpack.config.js:
Technically, this can be done with something like changing line
to
but is there any reason why this cannot / not intended to be done? I can open a PR myself if it's fine.