Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix): upgrade rpts2 / object-hash to support async rollup plugins (#506
) - object-hash v2.0.2 adds/fixes support for async functions - rpts2 v0.26.0 upgrades object-hash to v2.0.2 - rpts2 currently bundles several of its dependencies, so they can't be overridden manually and that's also why the object-hash change isn't visible in the yarn.lock file - previously, TSDX users who wanted to use rollup plugins (via tsdx.config.js) that use async/await internally (e.g. rollup-plugin-copy, rollup-plugin-url, rollup-plugin-visualizer, rollup-plugin-smart-asset, etc, etc, etc), would run into 'Unknown object type "asyncfunction"' from object-hash as rpts2 hashes the rollup config itself for caching - the only fix was to hackily override the rpts2 config in tsdx.config.js (which requires brittle copy+paste as its config isn't exposed) and then use a config option of rpts2, objectHashIgnoreUnknownHack (which is hacky, per the name) - this could cause stale cache issues, or, if used with clean, would disable the cache entirely, both of which are suboptimal experiences - now this really common issue is solved and there's no hacking needed to use plugins that make use of async/await NOTE: this does not affect source code that uses async/await, that was already supported, this just affects plugins (in tsdx.config.js) that use async/await
- Loading branch information