Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Can't make an alias that points towards a built-in node dependency #33

@tex0l

Description

@tex0l

Hi,
Some of the packages (namely from2 or tar-stream) I use use readable-stream which is a polyfill of the native node stream, and I want to use another polyfill (namely the ones used by rollup-plugin-node-builtins) since readable-stream doesn't work when packaging with rollup.

I wanted to use rollup-plugin-alias to replace programmatically every require('readable-stream') with require('stream'). But when I do that, I get this error:

[!] Error: Could not load stream (imported by /path/to/node_modules/from2/index.js): ENOENT: no such file or directory, open 'stream'

Apparently, I can't force rollup-plugin-alias not to resolve the paths, would it be possible to make an exception for node built-in modules ?

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