forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
39 lines (39 loc) · 1.25 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
var path = require('path');
var browserPath = path.join(__dirname, 'src', 'client', 'jupyter', 'browser');
module.exports = {
context: browserPath,
node: {
__filename: false,
// If this is not used then __dirname in bundled scripts is set to / and mathajax-electron
// https://github.com/nteract/mathjax-electron/blob/master/src/mathjax-electron.js#L22
// script.src = path.join(__dirname, "..", "resources", "MathJax", "MathJax.js?delayStartupUntil=configured");
__dirname: false
},
entry: path.join(browserPath, 'main.ts'),
output: {
filename: path.join(__dirname, 'out', 'client', 'jupyter', 'browser', 'bundle.js'),
publicPath: browserPath
},
resolve: {
root: browserPath,
extension: ['', '.ts']
},
module: {
loaders: [
{ test: /\.json$/, loader: 'ignore-loader' },
{
test: /.ts$/, loader: 'ts-loader',
exclude: /\.json$/,
include: browserPath
},
{
test: /.js/,
exclude: /\.json$/,
loader: 'babel-loader',
query: {
presets: 'es2015',
}
}
]
}
}