Closed bazineta closed 3 years ago
After updating to 4.0.0 I'm getting this error
TypeError: GitRevisionPlugin is not a constructor
@pirelenito: Same problem here.
Same problem here.
Thanks for the report. I'll probably have some time this week to fix the issue.
In the meantime, sticking to 3.0.6 is recommended as a workaround.
I just pushed a patched version v4.0.1
that fixes the issue by tweaking the build files.
As part of releasing v4
I migrated to https://tsdx.io/ and that bug was an unfortunate consequence that I missed.
If someone is familiar with that tool and wants to contribute a permanent fix, I'll happily take PR submissions. ❤️
I still see the error message as described in https://github.com/secvisogram/secvisogram/issues/10#issuecomment-831929359. However, the build seems to work.
Edit: Build works on my machine but not in the GitHub Actions: https://github.com/secvisogram/secvisogram/pull/44/checks?check_run_id=2500698867
I'm trying a new approach in #67. Can you try a beta build that I prepared @tschmidtb51 ?
"devDependencies": {
"git-revision-webpack-plugin": "^5.0.0-1"
}
And change your require statement to:
const { GitRevisionPlugin } = require('git-revision-webpack-plugin')
I'm trying a new approach in #67. Can you try a beta build that I prepared @tschmidtb51 ?
I did and it worked locally and in GitHub Actions: https://github.com/secvisogram/secvisogram/pull/46
Thank you all for your help! Just released v5.0.0
with the confirmed fix. ❤️
After upgrading to 4.0, I can no longer load as per the documentation, i.e., require the library, call
new Plugin()
. Callingnew Plugin.default()
does work.The library implementation has an
exports.default
, so that's not unexpected. I think you'd want amodule.exports
there instead, given that you're seemingly still going for CJS compatibility here.