mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-05-15 01:37:37 +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" />
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
<title>Azure Cosmos DB</title>
|
<title>Azure Cosmos DB</title>
|
||||||
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon" />
|
<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>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
+34
-1
@@ -212,7 +212,9 @@ module.exports = function (_env = {}, argv = {}) {
|
|||||||
new HTMLInlineCSSWebpackPlugin({
|
new HTMLInlineCSSWebpackPlugin({
|
||||||
filter: (fileName) => fileName.includes("cellOutputViewer"),
|
filter: (fileName) => fileName.includes("cellOutputViewer"),
|
||||||
}),
|
}),
|
||||||
new MonacoWebpackPlugin(),
|
new MonacoWebpackPlugin({
|
||||||
|
languages: ["json", "sql", "javascript", "python", "plaintext"],
|
||||||
|
}),
|
||||||
new CopyWebpackPlugin({
|
new CopyWebpackPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
{ from: "DataExplorer.nuspec" },
|
{ from: "DataExplorer.nuspec" },
|
||||||
@@ -262,6 +264,37 @@ module.exports = function (_env = {}, argv = {}) {
|
|||||||
extensions: [".tsx", ".ts", ".js"],
|
extensions: [".tsx", ".ts", ".js"],
|
||||||
},
|
},
|
||||||
optimization: {
|
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,
|
minimize: mode === "production" ? true : false,
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new TerserPlugin({
|
new TerserPlugin({
|
||||||
|
|||||||
Reference in New Issue
Block a user