Skip to content

[labs/analyzer] Add ability to customize the output location of a given source file #3578

@kevinpschaaf

Description

@kevinpschaaf

The analyzer currently implements a getJSPathFromSourcePath() function using ts.getOutputFileNames().

However, just because we can determine that src/foo.ts gets output by tsc to build/foo.js doesn't mean that's where the file is ultimately importable from (which is what jsPath intends to capture), since additional transforms outside of ts can (and often do) further process that into another location that is ultimately published (i.e. we output to ./development/*.js and process that further with rollup to ./*.js).

This is something we're going to hit pretty quickly when we start testing against real-world packages, and will likely need to solve by allowing the caller to the analyzer to effectively configure the getJSPathFromSourcePath() function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    📋 Triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions