forked from fab77/pyesasky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
47 lines (44 loc) · 1.09 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
var loaders = [
{ test: /\.ts$/, loader: 'ts-loader' },
{ test: /\.json$/, loader: 'json-loader' },
{ test: /\.js$/, loader: "source-map-loader" },
];
module.exports = [
{
// Notebook extension
entry: './lib/index.js',
output: {
filename: 'index.js',
path: __dirname + '/pyesasky/nbextension/static',
libraryTarget: 'amd'
},
module: {
loaders: loaders
},
devtool: 'source-map',
externals: ['@jupyter-widgets/base'],
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: [".webpack.js", ".web.js", ".ts", ".js"]
}
},
{
// embeddable bundle (e.g. for docs)
entry: './lib/index.js',
output: {
filename: 'embed-bundle.js',
path: __dirname + '/docs/source/_static',
library: "pyesasky",
libraryTarget: 'amd'
},
module: {
loaders: loaders
},
devtool: 'source-map',
externals: ['@jupyter-widgets/base'],
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: [".webpack.js", ".web.js", ".ts", ".js"]
},
},
];