1
1
const path = require ( 'path' ) ;
2
2
3
- const externals = [ '@jupyter-widgets/base' , 'three' ] ;
3
+ const externals = [ '@jupyter-widgets/base' , 'three' , 'module' ] ;
4
4
5
5
module . exports = [
6
6
{
@@ -17,11 +17,12 @@ module.exports = [
17
17
} ,
18
18
{
19
19
// jupyter-threejs bundle for the notebook
20
- entry : './src/index.js' ,
20
+ entry : [ './amd-public-path.js' , './ src/index.js'] ,
21
21
output : {
22
22
filename : 'index.js' ,
23
23
path : path . resolve ( __dirname , '..' , 'pythreejs' , 'static' ) ,
24
- libraryTarget : 'amd'
24
+ libraryTarget : 'amd' ,
25
+ publicPath : '' , // Set in amd-public-path.js
25
26
} ,
26
27
devtool : 'source-map' ,
27
28
externals : externals ,
@@ -32,14 +33,15 @@ module.exports = [
32
33
} ,
33
34
{
34
35
// embeddable jupyter-threejs bundle (e.g. for docs)
35
- entry : './src/index.js' ,
36
+ entry : [ './amd-public-path.js' , './ src/index.js'] ,
36
37
output : {
37
38
filename : 'index.js' ,
38
39
path : path . resolve ( __dirname , 'dist' ) ,
39
40
library : 'jupyter-threejs' ,
40
- libraryTarget : 'amd'
41
+ libraryTarget : 'amd' ,
42
+ publicPath : '' , // Set in amd-public-path.js
41
43
} ,
42
- externals : [ '@jupyter-widgets/base' ] ,
44
+ externals : [ '@jupyter-widgets/base' , 'module' ] ,
43
45
resolve : {
44
46
extensions : [ '.autogen.js' , '.js' ]
45
47
} ,
0 commit comments