egoist/bili

Warning about using objectHashIgnoreUnknownHack in rollup-plugin-typescript2

chocolateboy opened this issue ยท 4 comments

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 ๐ŸŽ‰ ๐Ÿ˜„

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

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,
        },
    }
}

๐ŸŽ‰ This issue has been resolved in version 4.9.3 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

bbugh commented

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