mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-05-14 17:27:30 +01:00
Enhance webpack configuration for optimization and language support
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<title>Azure Cosmos DB</title>
|
||||
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon" />
|
||||
<link rel="dns-prefetch" href="https://management.azure.com" />
|
||||
<link rel="dns-prefetch" href="https://login.microsoftonline.com" />
|
||||
<link rel="dns-prefetch" href="https://cosmos.azure.com" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
+34
-1
@@ -212,7 +212,9 @@ module.exports = function (_env = {}, argv = {}) {
|
||||
new HTMLInlineCSSWebpackPlugin({
|
||||
filter: (fileName) => fileName.includes("cellOutputViewer"),
|
||||
}),
|
||||
new MonacoWebpackPlugin(),
|
||||
new MonacoWebpackPlugin({
|
||||
languages: ["json", "sql", "javascript", "python", "plaintext"],
|
||||
}),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{ from: "DataExplorer.nuspec" },
|
||||
@@ -262,6 +264,37 @@ module.exports = function (_env = {}, argv = {}) {
|
||||
extensions: [".tsx", ".ts", ".js"],
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
chunks: "all",
|
||||
minSize: 30000,
|
||||
maxInitialRequests: 10,
|
||||
cacheGroups: {
|
||||
fluentui: {
|
||||
test: /[\\/]node_modules[\\/]@fluentui[\\/]/,
|
||||
name: "vendor-fluentui",
|
||||
chunks: "all",
|
||||
priority: 30,
|
||||
},
|
||||
nteract: {
|
||||
test: /[\\/]node_modules[\\/]@nteract[\\/]/,
|
||||
name: "vendor-nteract",
|
||||
chunks: "all",
|
||||
priority: 30,
|
||||
},
|
||||
azure: {
|
||||
test: /[\\/]node_modules[\\/]@azure[\\/]/,
|
||||
name: "vendor-azure",
|
||||
chunks: "all",
|
||||
priority: 30,
|
||||
},
|
||||
vendor: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
name: "vendor-common",
|
||||
chunks: "all",
|
||||
priority: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
minimize: mode === "production" ? true : false,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
|
||||
Reference in New Issue
Block a user