From 78a89d7ed154ef6e4de820262c137a3d218fa751 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 26 Mar 2026 14:56:55 -0700 Subject: [PATCH] Fix webpack CopyPlugin: rewrite icons path instead of deleting entry Previous sed deleted lines which broke the webpack config syntax. Instead, rewrite the `from:` path to point at the pre-copied icons directory which webpack can access without following Nix store symlinks. Co-Authored-By: Claude Opus 4.6 (1M context) --- containers/pyroscope/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/pyroscope/default.nix b/containers/pyroscope/default.nix index 33c6e64..69e03e6 100644 --- a/containers/pyroscope/default.nix +++ b/containers/pyroscope/default.nix @@ -35,9 +35,9 @@ let cp -rL ../../node_modules/@grafana/ui/dist/public/img/icons \ public/build/grafana/build/img/ - # Remove the CopyPlugin icons entry from webpack config so it doesn't - # fail on the symlinked glob - sed -i "/from: 'node_modules\/@grafana\/ui\/dist\/public\/img\/icons'/,/to:/d" \ + # Rewrite the CopyPlugin icons path to point at our pre-copied location + # instead of the symlinked node_modules path that webpack can't glob + sed -i "s|from: 'node_modules/@grafana/ui/dist/public/img/icons'|from: 'public/build/grafana/build/img/icons'|" \ scripts/webpack/webpack.common.js yarn --offline build