From ca4cc2b62130e5fe6f8a6fd734b143881ad002d6 Mon Sep 17 00:00:00 2001 From: Ryan Christian Date: Fri, 3 Sep 2021 02:11:38 -0500 Subject: [PATCH] docs: Adding comment about file inclusion in TS section --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 42d786cc..707a954c 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,8 @@ Just point the input to a `.ts` file through either the cli or the `source` key Microbundle will generally respect your TypeScript config defined in a `tsconfig.json` file with notable exceptions being the "[target](https://www.typescriptlang.org/tsconfig#target)" and "[module](https://www.typescriptlang.org/tsconfig#module)" settings. To ensure your TypeScript configuration matches the configuration that Microbundle uses internally it's strongly recommended that you set `"module": "ESNext"` and `"target": "ESNext"` in your `tsconfig.json`. +To ensure Microbundle does not process extraneous files, by default it only includes your entry point. If you want to include other files for compilation, such as ambient declarations, make sure to add either "[files](https://www.typescriptlang.org/tsconfig#files)" or "[include](https://www.typescriptlang.org/tsconfig#include)" into your `tsconfig.json`. + If you're using TypeScript with CSS Modules, you will want to set `"include": ["node_modules/microbundle/index.d.ts"]` in your `tsconfig.json` to tell TypeScript how to handle your CSS Module imports. ### CSS and CSS Modules