Skip to content

Commit

Permalink
cts/mts support (#451)
Browse files Browse the repository at this point in the history
Adding cts/mts/d.cts/d.mts to the known typescript filetypes
  • Loading branch information
ezolenko authored Jun 23, 2023
1 parent f861350 commit 2cb2660
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions dist/rollup-plugin-typescript2.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -27985,8 +27985,8 @@ const typescript = (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,
Expand Down Expand Up @@ -28114,7 +28114,7 @@ const typescript = (options) => {
// Rollup can't see these otherwise, because they are "emit-less" and produce no JS
if (result.references && supportsThisLoad) {
for (const ref of result.references) {
if (ref.endsWith(".d.ts"))
if (!filter(ref))
continue;
const module = yield this.resolve(ref, id);
if (!module || transformedFiles.has(module.id)) // check for circular references (per https://rollupjs.org/guide/en/#thisload)
Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.cjs.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/rollup-plugin-typescript2.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -27956,8 +27956,8 @@ const typescript = (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,
Expand Down Expand Up @@ -28085,7 +28085,7 @@ const typescript = (options) => {
// Rollup can't see these otherwise, because they are "emit-less" and produce no JS
if (result.references && supportsThisLoad) {
for (const ref of result.references) {
if (ref.endsWith(".d.ts"))
if (!filter(ref))
continue;
const module = yield this.resolve(ref, id);
if (!module || transformedFiles.has(module.id)) // check for circular references (per https://rollupjs.org/guide/en/#thisload)
Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.es.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ const typescript: PluginImpl<RPT2Options> = (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,
Expand Down Expand Up @@ -277,7 +277,7 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
// Rollup can't see these otherwise, because they are "emit-less" and produce no JS
if (result.references && supportsThisLoad) {
for (const ref of result.references) {
if (ref.endsWith(".d.ts"))
if (!filter(ref))
continue;

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

0 comments on commit 2cb2660

Please sign in to comment.