Skip to content

Support async rollup plugins / objectHashIgnoreUnknownHack flag from rpt2 #294

@arthurdenner

Description

@arthurdenner

Current Behavior

I'm using tsdx to bundle react-semantic-ui-datepickers and I can't upgrade rollup-plugin-copy to v3 because the build fails with the error Unknown object type "asyncfunction". This is because we are not passing the flag objectHashIgnoreUnknownHack to rpt2 which would solve the issue.

Can we add support for this flag on the build command or is that kind of risky? The rpt2 documentation states: Setting this option to true will make object-hash ignore unknowns, at the cost of not invalidating the cache if ignored elements are changed.

Desired Behavior

Build can be successful if the plugin gets the flag as true.

Suggested Solution

Add an option to the build command - --ignore-unknown-hack? - that results in the objectHashIgnoreUnknownHack being true while creating the rollup config.

Who does this impact? Who is this for?

tsdx users with custom rollup configs using plugins that use async/await, for example.

Describe alternatives you've considered

N/A.

Additional context

N/A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: integrationRelated to an integration, not necessarily to core (but could influence core)scope: upstreamIssue in upstream dependencytopic: rollup-plugin-typescript2Issues and PRs relating to rpts2

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions