Skip to content

Commit 295839e

Browse files
lelemmleandro-menezes-fusionflowgithub-actions[bot]
authored
🐛 Fix for worker in dev mode (#5878)
* Fix for worker in dev mode * Add release notes for PR #5878 * trigger actions --------- Co-authored-by: Leandro Menezes <leandro.menezes@fusionflowsoftware.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 99ca344 commit 295839e

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

packages/plugins-service/bin/build-service-worker

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ VITE_ARGS=""
66

77
DESKTOP_DIR="$ROOT"/../../desktop-client
88
SERVICE_WORKER_DIR="$DESKTOP_DIR"/service-worker
9-
mkdir -p "$SERVICE_WORKER_DIR"
109

1110
# Clean out previous build files
1211
rm -f ../dist/*
13-
rm -rf "$DESKTOP_DIR"/service-worker/*
12+
rm -rf "$DESKTOP_DIR"/service-worker
1413

1514
if [ $NODE_ENV == 'development' ]; then
1615
if [ "$OSTYPE" == "msys" ]; then
1716
# Ensure symlinks are created as native Windows symlinks.
1817
export MSYS=winsymlinks:nativestrict
1918
fi
20-
ln -snf "$ROOT"/../dist "$DESKTOP_DIR"/service-worker
19+
ln -snf "$ROOT"/../dist/ "$DESKTOP_DIR"/service-worker
2120
fi
2221

2322
yarn vite build --config ../vite.config.ts --mode $NODE_ENV $VITE_ARGS
2423

2524
if [ $NODE_ENV == 'production' ]; then
2625
# In production, just copy the built files
26+
mkdir -p "$SERVICE_WORKER_DIR"
2727
cp -r ../dist/* "$DESKTOP_DIR"/service-worker
2828
fi

upcoming-release-notes/5878.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
category: Bugfix
3+
authors: [lelemm]
4+
---
5+
6+
Fix service worker issues in development mode by improving directory handling and symlink creation.
7+

0 commit comments

Comments
 (0)