mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
@@ -18,11 +18,24 @@ define(['require', 'exports'], function (require) {
|
||||
require.__$__nodeRequire('gridstack/dist/h5/gridstack-dd-native');
|
||||
require.__$__nodeRequire('html-to-image/dist/html-to-image.js');
|
||||
require.__$__nodeRequire('reflect-metadata');
|
||||
require.__$__nodeRequire('chart.js');
|
||||
// VS Code uses an AMD loader for its own files (and ours) but Node.JS normally uses commonjs. For modules that
|
||||
// support UMD this may cause some issues since it will appear to them that AMD exists and so depending on the order
|
||||
// they check support for the two types they may end up using either commonjs or AMD. If commonjs is first this is
|
||||
// the expected method and so nothing needs to be done - but if it's AMD then the VS Code loader will throw an error
|
||||
// (Can only have one anonymous define call per script file) since it only expects to be loading its own files.
|
||||
|
||||
// In order to make packages like zone.js load correctly we need to temporarily set AMD to false so that the modules
|
||||
// load using commonjs before continuing.
|
||||
const amd = define.amd;
|
||||
define.amd = false;
|
||||
require.__$__nodeRequire('zone.js/dist/zone');
|
||||
require.__$__nodeRequire('zone.js/dist/zone-error');
|
||||
require.__$__nodeRequire('chart.js');
|
||||
define.amd = amd;
|
||||
|
||||
window['Zone']['__zone_symbol__ignoreConsoleErrorUncaughtError'] = true;
|
||||
window['Zone']['__zone_symbol__unhandledPromiseRejectionHandler'] = e => setImmediate(() => {
|
||||
window.dispatchEvent(new PromiseRejectionEvent('unhandledrejection', e));
|
||||
}); // let window handle this
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user