I am updating Blockly version from 2.x to 8.0.2 and i am using blockly_compressed.js.
;(function(root, factory) {
if (typeof define === 'function' && define.amd) { // AMD
define([], factory);
} else if (typeof exports === 'object') { // Node.js
module.exports = factory();
} else { // Browser
var factoryExports = factory();
root.Blockly = factoryExports;
}
}(this, function()
In my application i am getting typeof define value = function. So it's never going to else part (browser) and throwing an error Blockly is not defined while loading the page from browser.
But if I comment the if and if else part in blockly_compressed.js than it always going to else part (browser) and web page , blocks are loading perfectly.
I have tried to create one dummy application there type of defined value is coming undefined so it always going to else part and web page, blocks are loading perfectly.
Could you please suggest how to solve this issue and why typeof define value = function in my application.
Thanks,
Rupak