Closed DoctorKrolic closed 11 months ago
@aeschli can you help me with this. It is caused by the changes you did to the UMD packaging and I see the same when trying to package my eslint extension.
I think the problem is that webpack doesn't pick up the browser bits. Make sure to to have
resolve: {
mainFields: ['browser', 'module', 'main'],
I assumed you wanted to build a web extension.
If this is a desktop extension, it is
resolve: {
conditionNames: ['import', 'require'],
mainFields: ['module', 'main'],
@aeschli Thanks. Your tips worked for me.
@DoctorKrolic see @aeschli tips.
Thanks for tips, the issue is resolved. However, since this required me to explicitly specify additional configuration parameters, I think there are steps that can be done to fully resolve this incident:
README
, where the issue and its solution are briefly described. This way you would avoid such questions in the future and make this info searchable via search engines and AI assistants, so people can discover this easilyWhat change was needed?
The latter one:
resolve: {
conditionNames: ['import', 'require'],
mainFields: ['module', 'main'],
We also encountered this issue in our VS Code extension build and adding
resolve: {
conditionNames: ['import', 'require'],
mainFields: ['module', 'main'],
fixed the build issue. However, the extension now started showing another error at runtime:
crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported
We may be able to resolve this specific error, but I wonder if adding those parameters to resolve
could have changed other behaviors as well.
From what I read in https://github.com/uuidjs/uuid#getrandomvalues-not-supported this seems unrelated.
@aeschli any additional thoughts
I'm trying to pack a VS Code extension using webpack. I am on the latest public version of
vscode-languageclient
and I'm getting this warning when I try to build the extension:It it a known problem? It it even safe to use webpack in such case or it just generates less efficient code?