-
Notifications
You must be signed in to change notification settings - Fork 56
/
webpack.config.js
47 lines (46 loc) · 1.37 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
const MonacoEditorPlugin = require('monaco-editor-webpack-plugin');
const CompressionPlugin = require("compression-webpack-plugin");
module.exports = {
plugins: [
new CompressionPlugin({algorithm: "gzip", compressionOptions: { level: 9 }}),
new MonacoEditorPlugin({
//
// Include a subset of languages support
// Some language extensions like typescript are so huge that may impact build performance
// e.g. Build full languages support with webpack 4.0 takes over 80 seconds
// Languages are loaded on demand at runtime
languages: ['javascript', 'css', 'html', 'typescript', 'java']
})
],
optimization: {
minimize: true,
splitChunks: {
chunks: 'all',
},
},
module: {
rules: [
{
test: /\.css$/,
use: [ 'style-loader', 'css-loader', 'cssimportant-loader' ],
},
{
test: /\.vue$/,
exclude: [
'./public/static/templates/'
]
},
{
test: /\.m?js$/,
type: 'javascript/auto',
resolve: {
fullySpecified: false,
},
}
]
},
devServer: {
port: 8081,
disableHostCheck : true,
},
}