forked from SparkDevNetwork/Rock
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathwebpack.config.monaco.js
More file actions
57 lines (56 loc) · 1.63 KB
/
webpack.config.monaco.js
File metadata and controls
57 lines (56 loc) · 1.63 KB
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
48
49
50
51
52
53
54
55
56
57
const path = require("path");
const TerserPlugin = require("terser-webpack-plugin");
const EolPlugin = require("./webpack-eol-plugin");
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
module.exports = {
mode: "production",
devtool: "source-map",
entry: {
Monaco: {
import: "./src/monaco.js",
filename: "monaco.js"
}
},
output: {
path: path.resolve(__dirname, "../RockWeb/Scripts/Rock/Monaco"),
},
/* Enable caching so rebuilds are faster. */
cache: {
type: "filesystem",
buildDependencies: {
config: [__filename],
},
},
resolve: {
/* WebPack will process `.ts` and then if not found try `.js`. */
extensions: [".ts", ".js"]
},
module: {
rules: [
/* all files with a `.ts` extension will be handled by `ts-loader`. */
{
test: /\.ts$/,
loader: "ts-loader"
},
/* `.css` files are plain CSS, configure standard loader. */
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},
],
},
optimization: {
minimizer: [
new TerserPlugin({
/* Disable the LICENSE.txt file that normally gets generated. */
extractComments: false,
}),
],
},
plugins: [
new MonacoWebpackPlugin({
languages: ["typescript", "javascript", "css", "html", "csharp", "liquid", "json", "less", "markdown", "powershell", "sql", "xml"],
}),
new EolPlugin(),
]
};