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) <noreply@anthropic.com>
This commit is contained in:
parent
10398c715c
commit
78a89d7ed1
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue