Skip to content

Commit 166a83e

Browse files
authored
feat: Build optimization phase 2 (#486)
* feat: Build optimization phase 2 Updates release.yml to clean up dist prior to rebuilding; removes old build-all code. * feat: Update vite.config.js Changes emptyOutDir to false, to prevent mass-cleanup of the dist/ folder (this step is now handled in the release workflow, where only the affected output folders are deleted prior to rebuilding).
1 parent c43a4ce commit 166a83e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ jobs:
6868
echo "Building affected workspaces:"
6969
for workspace in "${AFFECTED_WORKSPACES_ARRAY[@]}"; do
7070
echo " - samples/$workspace"
71-
71+
rm -rf dist/samples/$workspace
72+
(cd samples/ && npm run build --workspace=$workspace)
7273
done
7374
7475
- name: Get Deleted Workspaces
@@ -85,8 +86,6 @@ jobs:
8586
echo " - samples/$workspace"
8687
done
8788
88-
- run: npm run build-all
89-
9089
- uses: google-github-actions/auth@v1
9190
with:
9291
credentials_json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}

samples/vite.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dotenv.config();
2222
export default defineConfig({
2323
root: '../',
2424
build: {
25-
emptyOutDir: true,
25+
emptyOutDir: false,
2626
outDir: '../dist',
2727
},
2828
preview: {
@@ -32,4 +32,4 @@ export default defineConfig({
3232
define: {
3333
'import.meta.env.GOOGLE_MAPS_API_KEY': JSON.stringify(process.env.GOOGLE_MAPS_API_KEY)
3434
}
35-
});
35+
});

0 commit comments

Comments
 (0)