Open dhakehurst opened 1 month ago
Currently, we have no plans for removing or replacing lodash, but I recently looked into whether it's possible and how much work it would require https://github.com/ckeditor/ckeditor5/issues/16395#issuecomment-2399644734.
📝 Provide detailed reproduction steps (if any)
e.g. background.mjs (from the firefox extension)
✔️ Expected result
should work
❌ Actual result
EvalError: call to Function() blocked by CSP
❓ Possible solution
Don't use lodash ! ?
📃 Other details
From what I can discover, there is code added to the executed script when importing ckeditor5
var root$2 = freeGlobal || freeSelf || Function('return this')();
which seems to come from lodash-esI can't see how to exclude this from the ckeditor 5 import, I would have expected it to get 'tree-shaken' out, as as far as I know its not being used, but maybe it is internally to ckeditor5 somewhere.
One is not allows to set the CSP
script-src 'self' 'unsafe-eval'
in a firefox extension.any ideas welcomed
If you'd like to see this fixed sooner, add a 👍 reaction to this post.