htmlifier icon indicating copy to clipboard operation
htmlifier copied to clipboard

Can't produce a working html for kaios

Open suoko opened this issue 4 years ago • 1 comments

If you download the html from any scratch project you won't be able to package it in a kaios app due to eval() not allowed. Do you thing there is a fix for that?

https://github.com/suoko/scratchonkaios

https://developer.test.kaiostech.com/docs/sfp-3.0/02.getting-started/01.env-setup/simulator/

suoko avatar Aug 17 '21 16:08 suoko

The eval function is used by some dependency of Scratch to evaluate require('buffer').Buffer. The use of eval here is completely unnecessary, but I can't get rid of this dependency because js-base64 doesn't show up anywhere in Scratch VM's package-lock.json

Since the eval function isn't necessary, you could try replacing all instances of eval("require('buffer').Buffer") with require('buffer').Buffer in the resulting HTML file

SheepTester avatar Aug 17 '21 17:08 SheepTester