decentraland / smart-items

💡Smart item examples
19 stars 18 forks source link

"dcl pack" is not packing the code files in the item.zip #30

Open sa-cros opened 2 years ago

sa-cros commented 2 years ago

While following the document on smart items, I tried running the "dcl pack" command for one of the smart items from this repository. The item zip created does not contain the code files.

Same is the behavior if I am trying to create a smart item from scratch using "dcl init" and then trying to bundle it using pack command.

daltonmachado commented 2 years ago

I was facing this issue as well and figured out that this happens because the default .dclignore file ignores all TypeScript files.

The workaround is to remove the *.ts line from .dclignore file.

The Smart Item template repository should have its .dclignore file changed to not ignore TypeScript files right away or the exported scenes from Builder should not reference the original .ts files. As it is right now, it's not possible (without being aware of this issue and how to fix it) to create a Smart Item, upload it to the Builder and then get it working after exporting the scene from Builder and running it locally.