Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning about using objectHashIgnoreUnknownHack in rollup-plugin-typescript2 #305

Closed
chocolateboy opened this issue Feb 16, 2020 · 4 comments · Fixed by #339
Closed

Warning about using objectHashIgnoreUnknownHack in rollup-plugin-typescript2 #305

chocolateboy opened this issue Feb 16, 2020 · 4 comments · Fixed by #339
Labels

Comments

@chocolateboy
Copy link
Contributor

When running bili (bili/4.8.1 linux-x64 node-v13.8.0) on a TypeScript project, I'm getting the following warning from the latest version of rollup-plugin-typescript2 (v0.26.0):

rpt2: You are using 'objectHashIgnoreUnknownHack' option. If you enabled it because of async functions, try disabling it now.

This option is set to true here:

objectHashIgnoreUnknownHack: true,

- but, according to this comment, it's no longer needed in the latest version of the plugin:

No need to use objectHashIgnoreUnknownHack to support async plugins and no more cache issues -- was just released as v0.26.0 🎉 😄

@chocolateboy
Copy link
Contributor Author

Unrelated, but also spotted this in a comment in that issue (also mentioned here), which looks like it provides better integration with Babel (among other features): https://github.com/wessberg/rollup-plugin-ts

@chocolateboy
Copy link
Contributor Author

Temporary workaround (when using rollup-plugin-typescript2 >= v0.26):

$ cat bili.config.js
// a config file for bili [1]. currently used to silence a warning generated by
// rollup-plugin-typescript2 [2]
//
// [1] https://github.com/egoist/bili
// [2] https://github.com/egoist/bili/issues/305

export default {
    plugins: {
        typescript2: {
            objectHashIgnoreUnknownHack: false,
        },
    }
}

fi3ework pushed a commit that referenced this issue Apr 28, 2020
#305) (#339)

rollup-plugin-typescript2 < v0.26 needs the `objectHashIgnoreUnknownHack`
option to be enabled to correctly handle async plugins, but it's no
longer needed (and causes a warning) if the user has a more recent
version installed.

this PR detects the version of the plugin, if installed, and enables/disables the option accordingly.
@egoist
Copy link
Owner

egoist commented Apr 28, 2020

🎉 This issue has been resolved in version 4.9.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bbugh
Copy link

bbugh commented Jun 19, 2021

I am seeing this issue in 5.0.5. The workaround that @chocolateboy posted above worked to disable the message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants