diff --git a/.gitignore b/.gitignore index d5eca47..94beef7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ node_modules dist +tsconfig.tsbuildinfo # Swap the comments on the following lines if you don't wish to use zero-installs # Documentation here: https://yarnpkg.com/features/zero-installs diff --git a/packages/pkg1/tsconfig.json b/packages/pkg1/tsconfig.json index dc0651d..10e7a14 100644 --- a/packages/pkg1/tsconfig.json +++ b/packages/pkg1/tsconfig.json @@ -1,3 +1,7 @@ { + "compilerOptions": { + "composite": true, + "declaration": true + }, "include": ["./*.ts"] -} \ No newline at end of file +} diff --git a/packages/pkg2/tsconfig.json b/packages/pkg2/tsconfig.json index dc0651d..10e7a14 100644 --- a/packages/pkg2/tsconfig.json +++ b/packages/pkg2/tsconfig.json @@ -1,3 +1,7 @@ { + "compilerOptions": { + "composite": true, + "declaration": true + }, "include": ["./*.ts"] -} \ No newline at end of file +} diff --git a/tsconfig.json b/tsconfig.json index c40d808..9b3107b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,11 @@ { - "include": ["./src/*.ts"] -} \ No newline at end of file + "include": ["./src/*.ts"], + "references": [ + { + "path":"./packages/pkg1" + }, + { + "path": "./packages/pkg2" + } + ] +} diff --git a/webpack.config.js b/webpack.config.js index 5cc2f83..de43c7d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,5 +18,5 @@ module.exports = { }, ], }, - plugins: [new ForkTsCheckerWebpackPlugin()], + plugins: [new ForkTsCheckerWebpackPlugin({ typescript: { build: true }})], };