Skip to content

Bug: Compiler can't resolve relative .js paths in a workspace package #187

Description

@ankhzet

With a pnpm workspace structure:

packages/
    a/
        index.ts: `import { c } from 'b'`
    b/
        index.ts: `export * from './c.js'`
        c.ts: `export const c = 1;`

it seems compiler struggles with resolving relative .js:
cannot embed npm package code: package 'b' cannot resolve './c.js' from xyz/packages/b/index.ts (dependency chain: b)

export * from './c' also fails, but export * from './c.ts' works. Local imports of .ts sources via '.js' extension also work fine.

I guess. the problem is that compiler treats all external packages as compiled npm dists, even if it's a symlinked local workspace package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions