From 027639a4ade45ccc43f87bc4bdd979a9afe1553e Mon Sep 17 00:00:00 2001 From: ezolenko Date: Fri, 19 May 2023 16:32:00 -0600 Subject: [PATCH] - fix for mts and cts file types being ignored #446 --- README.md | 4 ++-- package.json | 2 +- src/index.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 545a202..4b72737 100644 --- a/README.md +++ b/README.md @@ -152,11 +152,11 @@ See [#108](https://github.com/ezolenko/rollup-plugin-typescript2/issues/108) Path to cache. Defaults to a folder in `node_modules`. -* `include`: `[ "*.ts+(|x)", "**/*.ts+(|x)" ]` +* `include`: `[ "*.ts+(|x)", "**/*.ts+(|x)", "**/*.cts", "**/*.mts" ]` By default compiles all `.ts` and `.tsx` files with TypeScript. -* `exclude`: `[ "*.d.ts", "**/*.d.ts" ]` +* `exclude`: `[ "*.d.ts", "**/*.d.ts", "**/*.d.cts", "**/*.d.mts" ]` But excludes type definitions. diff --git a/package.json b/package.json index 50aac2e..693474b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup-plugin-typescript2", - "version": "0.34.2", + "version": "0.35.0", "description": "Seamless integration between Rollup and TypeScript. Now with errors.", "main": "dist/rollup-plugin-typescript2.cjs.js", "module": "dist/rollup-plugin-typescript2.es.js", diff --git a/src/index.ts b/src/index.ts index 97931f2..d3d7532 100644 --- a/src/index.ts +++ b/src/index.ts @@ -95,8 +95,8 @@ const typescript: PluginImpl = (options) => verbosity: VerbosityLevel.Warning, clean: false, cacheRoot: findCacheDir({ name: "rollup-plugin-typescript2" }), - include: ["*.ts+(|x)", "**/*.ts+(|x)"], - exclude: ["*.d.ts", "**/*.d.ts"], + include: ["*.ts+(|x)", "**/*.ts+(|x)", "**/*.cts", "**/*.mts"], + exclude: ["*.d.ts", "**/*.d.ts", "**/*.d.cts", "**/*.d.mts"], abortOnError: true, rollupCommonJSResolveHack: false, tsconfig: undefined,