forked from jupyterlab/jupyterlab-monaco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
33 lines (32 loc) · 1.01 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
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: {
// Package each language's worker and give these filenames in `getWorkerUrl`
"editor.worker": 'monaco-editor/esm/vs/editor/editor.worker.js',
"json.worker": 'monaco-editor/esm/vs/language/json/json.worker',
"css.worker": 'monaco-editor/esm/vs/language/css/css.worker',
"html.worker": 'monaco-editor/esm/vs/language/html/html.worker',
"ts.worker": 'monaco-editor/esm/vs/language/typescript/ts.worker',
},
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'lib'),
globalObject: 'self'
},
module: {
rules: [{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}]
},
mode: 'development',
devtool: 'source-map',
plugins: [
// Ignore require() calls in vs/language/typescript/lib/typescriptServices.js
new webpack.IgnorePlugin(
/^((fs)|(path)|(os)|(crypto)|(source-map-support))$/,
/vs\/language\/typescript\/lib/
)
]
};