Uncompressed ES6 modules

298 views
Skip to first unread message

Uwe K

unread,
Oct 5, 2020, 10:32:12 AM10/5/20
to Blockly

Hello,

is there a way to work with an uncompressed version of Blockly ES6 modules? I'm trying to switch to Blockly modules in my project and I'm running into problems. An uncompressed version would be very helpful. So far I only found closure settings for pretty printing and whitespace-only optimization.

thanks,
Uwe

Sam El-Husseini

unread,
Oct 5, 2020, 3:22:56 PM10/5/20
to Blockly
Hello,

Unfortunately no. Although Blockly's codebase is split into multiple files, each file is not wrapped into an ES6 module or a closure module for that matter. The Blockly playground is currently the only way to truly run Blockly uncompressed.
However, we have recently started publishing sources and sourcemaps to our package on npm. If you use something like webpack, you're able to configure it to extract these sourcemaps which should go a long way in helping you debug your code.
You can see how we've done this for our Blockly plugins script here.

Cheers,
Sam

Uwe K

unread,
Oct 6, 2020, 1:19:01 PM10/6/20
to Blockly
Thank you Sam, sourcemaps help a lot!
Reply all
Reply to author
Forward
0 new messages