astrochili / vscode-defold

A toolkit for Visual Studio Code to develop games with Defold
https://marketplace.visualstudio.com/items?itemName=astronachos.defold
MIT License
160 stars 10 forks source link

require invoked from pcall can't load a module #44

Open kamchatka-volcano opened 5 days ago

kamchatka-volcano commented 5 days ago

Hi, for some reason, loading modules with pcall doesn't work from the Defold kit, although it loads fine when building from the Defold editor. Some libraries use this pattern to select between local and global dependencies by checking the status code of pcall. For instance, I had to patch the penlight library to use it with a Defold project from VSCode with the Defold kit.

Steps to reproduce:

Is it a limitation of the bob build tool?