Skip to content

Commit

Permalink
- allowing ES2020 module type in tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
ezolenko committed Dec 17, 2020
1 parent bd2e043 commit eb1dd17
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -25121,7 +25121,7 @@ function createFilter(context, pluginOptions, parsedConfig) {

function checkTsConfig(parsedConfig) {
const module = parsedConfig.options.module;
if (module !== tsModule.ModuleKind.ES2015 && module !== tsModule.ModuleKind.ESNext)
if (module !== tsModule.ModuleKind.ES2015 && module !== tsModule.ModuleKind.ESNext && module !== tsModule.ModuleKind.ES2020)
throw new Error(`Incompatible tsconfig option. Module resolves to '${tsModule.ModuleKind[module]}'. This is incompatible with rollup, please use 'module: "ES2015"' or 'module: "ESNext"'.`);
}

Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.cjs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -25111,7 +25111,7 @@ function createFilter(context, pluginOptions, parsedConfig) {

function checkTsConfig(parsedConfig) {
const module = parsedConfig.options.module;
if (module !== tsModule.ModuleKind.ES2015 && module !== tsModule.ModuleKind.ESNext)
if (module !== tsModule.ModuleKind.ES2015 && module !== tsModule.ModuleKind.ESNext && module !== tsModule.ModuleKind.ES2020)
throw new Error(`Incompatible tsconfig option. Module resolves to '${tsModule.ModuleKind[module]}'. This is incompatible with rollup, please use 'module: "ES2015"' or 'module: "ESNext"'.`);
}

Expand Down
2 changes: 1 addition & 1 deletion dist/rollup-plugin-typescript2.es.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/check-tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export function checkTsConfig(parsedConfig: tsTypes.ParsedCommandLine): void
{
const module = parsedConfig.options.module!;

if (module !== tsModule.ModuleKind.ES2015 && module !== tsModule.ModuleKind.ESNext)
if (module !== tsModule.ModuleKind.ES2015 && module !== tsModule.ModuleKind.ESNext && module !== tsModule.ModuleKind.ES2020)
throw new Error(`Incompatible tsconfig option. Module resolves to '${tsModule.ModuleKind[module]}'. This is incompatible with rollup, please use 'module: "ES2015"' or 'module: "ESNext"'.`);
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "./tsconfig.base",
"compilerOptions": {
"target": "es6",
"module": "ES2020",
"noImplicitAny": true,
"sourceMap": true,
"noUnusedParameters": true,
Expand Down

0 comments on commit eb1dd17

Please sign in to comment.