Skip to content

generated output don't follow moduleSuffixes option #49586

Closed
@ryanroe

Description

@ryanroe

Bug Report

typescript generated output don't follow moduleSuffixes option,

🔎 Search Terms

searched terms: moduleSuffixes, result none

🕗 Version & Regression Information

typescript@4.7.3 and typescript@next(4.8.0-dev.20220616)

💻 Code

create 2 ts files
a.web.ts

export const a = "web"

a.node.ts

export const a = "node"

create index.ts

import {a} from './a'

create tsconfig.json with

{
"moduleSuffixes":[".node",""]
}

run tsc -w

stackblitz link

🙁 Actual behavior

generated index.js directly imports a from './a'

🙂 Expected behavior

generated index.js directly imports a from './a.node' according to moduleSuffixes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions