-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Closed
Copy link
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
Milestone
Description
Bug Report
transpileModule fails with TS5104 error when verbatimModuleSyntax: true
"TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'"
Why? According to those comments (and source code)
TypeScript/src/services/transpile.ts
Lines 49 to 55 in 746a6fe
* Extra compiler options that will unconditionally be used by this function are: | |
* - isolatedModules = true | |
* - allowNonTsExtensions = true | |
* - noLib = true | |
* - noResolve = true | |
*/ | |
export function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput { |
it unconditionally adds 'isolatedModules: true' to compiler options. And fails because verbatimModuleSyntax is not compatible with isolatedModules.
🔎 Search Terms
verbatimModuleSyntax
isolatedModules
transpileModule
🕗 Version & Regression Information
5.0.1-rc
5.1.0-dev.20230307
- I was unable to test this on prior versions because verbatimModuleSyntax is not available in 4.x
⏯ Playground Link
N/A
💻 Code
transpileModule('any valid code', {compilerOptions: {verbatimModuleSyntax: true, /* common options like module, etc. */}})
🙁 Actual behavior
TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'
🙂 Expected behavior
No errors
Metadata
Metadata
Assignees
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.