question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support async rollup plugins / objectHashIgnoreUnknownHack flag from rpt2

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
arvinsimcommented, Nov 7, 2019

While I was searching for ways to import assets by using plugins like rollup-plugin-url and rollup-plugin-smart-asset, I get this error too.

2reactions
agilgur5commented, Mar 20, 2020

Out-of-the-box support for async rollup plugins was just released in v0.13.0!

Read more comments on GitHub >

github_iconTop Results From Across the Web

rollup.js
Rollup can import existing CommonJS modules through a plugin. ... If you want to create your config asynchronously, Rollup can also handle a...
Read more >
rollup-plugin-typescript2
This plugin inherits all compiler options and file lists from your tsconfig.json file. If your tsconfig has another name or another relative ...
Read more >
Warning about using objectHashIgnoreUnknownHack in ...
rpt2 : You are using 'objectHashIgnoreUnknownHack' option. ... No need to use objectHashIgnoreUnknownHack to support async plugins and no more cache issues ...
Read more >
Change Log
Async Rollup Plugins for tsdx.config.js are now supported out-of-the-box (no more need for hacks like objectHashIgnoreUnknownHack ); Jest's --config flag is ...
Read more >
Snowpack + Rollup : A match made in heaven
Now we will take a brief look at what each and every plugin contributes to how Snowpack bundles your dependencies into ESM compatible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found