Content-Length: 2065 | pFad | http://github.com/coderabbitai/grafana/pull/186.patch
thub.com
From ce39a84abfd8df3579565dd2a387bc676e7da5c4 Mon Sep 17 00:00:00 2001
From: Gurinder Singh
Date: Thu, 5 Sep 2024 09:38:46 -0400
Subject: [PATCH] docker file and webpack fix
---
Dockerfile | 2 +-
scripts/webpack/webpack.dev.js | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index ddc1398f7f2aa..85dd31d284cf9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -24,7 +24,7 @@ COPY conf/defaults.ini ./conf/defaults.ini
RUN apk add --no-cache make build-base python3
-RUN yarn install --immutable
+RUN yarn install
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js ./
COPY scripts scripts
diff --git a/scripts/webpack/webpack.dev.js b/scripts/webpack/webpack.dev.js
index cdc35f8aee136..da981a5a3839d 100644
--- a/scripts/webpack/webpack.dev.js
+++ b/scripts/webpack/webpack.dev.js
@@ -1,6 +1,8 @@
'use strict';
const browserslist = require('browserslist');
+const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
+const { EsbuildPlugin } = require('esbuild-loader');
const { resolveToEsbuildTarget } = require('esbuild-plugin-browserslist');
const ESLintPlugin = require('eslint-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
@@ -67,12 +69,22 @@ module.exports = (env = {}) => {
},
// https://webpack.js.org/guides/build-performance/#avoid-extra-optimization-steps
+ // optimization: {
+ // moduleIds: 'named',
+ // runtimeChunk: true,
+ // removeAvailableModules: false,
+ // removeEmptyChunks: false,
+ // splitChunks: false,
+ // },
+
optimization: {
moduleIds: 'named',
runtimeChunk: true,
removeAvailableModules: false,
removeEmptyChunks: false,
splitChunks: false,
+ minimize: parseInt(env.noMinify, 10) !== 1,
+ minimizer: [new EsbuildPlugin(esbuildOptions), new CssMinimizerPlugin()],
},
// enable persistent cache for faster cold starts
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/coderabbitai/grafana/pull/186.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy