We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 066e27b + 00c7390 commit 5b6dcafCopy full SHA for 5b6dcaf
js/src/jupyterlab-plugin.js
@@ -1,15 +1,28 @@
1
-var jupyter_threejs = require('./index');
2
-
3
var base = require('@jupyter-widgets/base');
+var version = require('./version');
4
5
module.exports = {
6
id: 'jupyter.extensions.jupyter-threejs',
7
requires: [base.IJupyterWidgetRegistry],
8
activate: function(app, widgets) {
9
widgets.registerWidget({
10
name: 'jupyter-threejs',
11
- version: jupyter_threejs.version,
12
- exports: jupyter_threejs
+ version: version.version,
+ exports: function(){
+ return new Promise(function(resolve, reject){
13
+ require.ensure(
14
+ ['./index'],
15
+ function(require) {
16
+ resolve(require('./index'));
17
+ },
18
+ function(err) {
19
+ console.error(err);
20
+ reject(err);
21
22
+ 'jupyter-threejs'
23
+ );
24
+ });
25
+ }
26
});
27
},
28
autoStart: true
0 commit comments