Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/test/monaco/webpack.config.js
3520 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
const path = require('path');
7
const WarningsToErrorsPlugin = require('warnings-to-errors-webpack-plugin');
8
9
module.exports = {
10
mode: 'production',
11
entry: {
12
'core': './core.js',
13
'editorWebWorkerMain': '../../out-monaco-editor-core/esm/vs/editor/common/services/editorWebWorkerMain.js',
14
},
15
output: {
16
globalObject: 'self',
17
filename: '[name].bundle.js',
18
path: path.resolve(__dirname, './dist')
19
},
20
module: {
21
rules: [
22
{
23
test: /\.css$/,
24
use: ['style-loader', 'css-loader'],
25
},
26
{
27
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
28
use: [
29
{
30
loader: 'file-loader',
31
options: {
32
name: '[name].[ext]',
33
outputPath: 'fonts/'
34
}
35
}
36
]
37
}
38
]
39
},
40
resolve: {
41
alias: {
42
'monaco-editor-core': path.resolve(__dirname, '../../out-monaco-editor-core/esm/vs/editor/editor.main.js'),
43
}
44
},
45
stats: {
46
all: false,
47
modules: true,
48
errors: true,
49
warnings: true,
50
// our additional options
51
moduleTrace: true,
52
errorDetails: true,
53
chunks: true
54
},
55
plugins: [
56
new WarningsToErrorsPlugin()
57
],
58
optimization: {
59
// Without it, CI fails, which indicates a webpack minification bug.
60
minimize: false,
61
},
62
};
63
64