Skip to content

Commit 4761736

Browse files
committed
support latex and __dirname in bundle
1 parent 5549d8f commit 4761736

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

webpack.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
var path = require('path');
22
var browserPath = path.join(__dirname, 'src', 'client', 'jupyter', 'browser');
33
module.exports = {
4-
//context: browserPath,
4+
context: browserPath,
5+
node: {
6+
__filename: false,
7+
// If this is not used then __dirname in bundled scripts is set to / and mathajax-electron
8+
// https://github.com/nteract/mathjax-electron/blob/master/src/mathjax-electron.js#L22
9+
// script.src = path.join(__dirname, "..", "resources", "MathJax", "MathJax.js?delayStartupUntil=configured");
10+
__dirname: false
11+
},
512
entry: path.join(browserPath, 'main.ts'),
613
output: {
7-
filename: path.join(__dirname, 'out', 'client', 'jupyter', 'browser', 'bundle.js')
14+
filename: path.join(__dirname, 'out', 'client', 'jupyter', 'browser', 'bundle.js'),
15+
publicPath: browserPath
816
},
917
resolve: {
1018
root: browserPath,

0 commit comments

Comments
 (0)