Skip to content

Commit 2cb2660

Browse files
authored
cts/mts support (#451)
Adding cts/mts/d.cts/d.mts to the known typescript filetypes
1 parent f861350 commit 2cb2660

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

dist/rollup-plugin-typescript2.cjs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27985,8 +27985,8 @@ const typescript = (options) => {
2798527985
verbosity: VerbosityLevel.Warning,
2798627986
clean: false,
2798727987
cacheRoot: findCacheDir({ name: "rollup-plugin-typescript2" }),
27988-
include: ["*.ts+(|x)", "**/*.ts+(|x)"],
27989-
exclude: ["*.d.ts", "**/*.d.ts"],
27988+
include: ["*.ts+(|x)", "**/*.ts+(|x)", "**/*.cts", "**/*.mts"],
27989+
exclude: ["*.d.ts", "**/*.d.ts", "**/*.d.cts", "**/*.d.mts"],
2799027990
abortOnError: true,
2799127991
rollupCommonJSResolveHack: false,
2799227992
tsconfig: undefined,
@@ -28114,7 +28114,7 @@ const typescript = (options) => {
2811428114
// Rollup can't see these otherwise, because they are "emit-less" and produce no JS
2811528115
if (result.references && supportsThisLoad) {
2811628116
for (const ref of result.references) {
28117-
if (ref.endsWith(".d.ts"))
28117+
if (!filter(ref))
2811828118
continue;
2811928119
const module = yield this.resolve(ref, id);
2812028120
if (!module || transformedFiles.has(module.id)) // check for circular references (per https://rollupjs.org/guide/en/#thisload)

dist/rollup-plugin-typescript2.cjs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rollup-plugin-typescript2.es.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27956,8 +27956,8 @@ const typescript = (options) => {
2795627956
verbosity: VerbosityLevel.Warning,
2795727957
clean: false,
2795827958
cacheRoot: findCacheDir({ name: "rollup-plugin-typescript2" }),
27959-
include: ["*.ts+(|x)", "**/*.ts+(|x)"],
27960-
exclude: ["*.d.ts", "**/*.d.ts"],
27959+
include: ["*.ts+(|x)", "**/*.ts+(|x)", "**/*.cts", "**/*.mts"],
27960+
exclude: ["*.d.ts", "**/*.d.ts", "**/*.d.cts", "**/*.d.mts"],
2796127961
abortOnError: true,
2796227962
rollupCommonJSResolveHack: false,
2796327963
tsconfig: undefined,
@@ -28085,7 +28085,7 @@ const typescript = (options) => {
2808528085
// Rollup can't see these otherwise, because they are "emit-less" and produce no JS
2808628086
if (result.references && supportsThisLoad) {
2808728087
for (const ref of result.references) {
28088-
if (ref.endsWith(".d.ts"))
28088+
if (!filter(ref))
2808928089
continue;
2809028090
const module = yield this.resolve(ref, id);
2809128091
if (!module || transformedFiles.has(module.id)) // check for circular references (per https://rollupjs.org/guide/en/#thisload)

dist/rollup-plugin-typescript2.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
9595
verbosity: VerbosityLevel.Warning,
9696
clean: false,
9797
cacheRoot: findCacheDir({ name: "rollup-plugin-typescript2" }),
98-
include: ["*.ts+(|x)", "**/*.ts+(|x)"],
99-
exclude: ["*.d.ts", "**/*.d.ts"],
98+
include: ["*.ts+(|x)", "**/*.ts+(|x)", "**/*.cts", "**/*.mts"],
99+
exclude: ["*.d.ts", "**/*.d.ts", "**/*.d.cts", "**/*.d.mts"],
100100
abortOnError: true,
101101
rollupCommonJSResolveHack: false,
102102
tsconfig: undefined,
@@ -277,7 +277,7 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
277277
// Rollup can't see these otherwise, because they are "emit-less" and produce no JS
278278
if (result.references && supportsThisLoad) {
279279
for (const ref of result.references) {
280-
if (ref.endsWith(".d.ts"))
280+
if (!filter(ref))
281281
continue;
282282

283283
const module = await this.resolve(ref, id);

0 commit comments

Comments
 (0)