V16: Vite development optimizations (#18915)

* feat: resolve TODO by removing quiet option

* feat: exclude ./src/mocks from production build

* feat: load only msw when running through vite

* feat: optimise load order

* feat: handles mocked logos with virtual path

* feat: loads mocked service worker from virtual path

* feat: loads assets from virtual path

* feat: forces MSW=on for the static build

* build: adds storybook workflow copied over from the old backoffice repository

* build: limits where the build runs

* build: adds workflow to build a static version of the backoffice upon request

* build: excludes the `/umbraco/backoffice/assets` folder from navigation fallback just in case

* build: triggers run when the workflow file itself changes

* build: triggers run when package.json changes

* build: marks the 'contrib' branch as production

* build: activates static builds on preview/* labels

* build: bumps github checkout version

* build: updates key for backoffice web app

* build: updates key for storybook

* build: disables build for release branches to preseve on preview environments
This commit is contained in:
Jacob Overgaard
2025-04-03 16:15:04 +02:00
committed by GitHub
parent c3709de1d3
commit 7d7db6bb2b
12 changed files with 150 additions and 42 deletions

View File

@@ -152,7 +152,7 @@
"build-storybook": "npm run wc-analyze && storybook build",
"build:for:cms": "npm run build && npm run build:workspaces && npm run generate:manifest && npm run package:validate && node ./devops/build/copy-to-cms.js",
"build:for:npm": "npm run build -- --declaration && npm run generate:manifest && npm run package:validate",
"build:for:static": "vite build",
"build:for:static": "cross-env VITE_UMBRACO_USE_MSW=on vite build",
"build:vite": "tsc && vite build --mode staging",
"build:workspaces": "npm run build -ws --if-present",
"build": "tsc --project ./src/tsconfig.build.json",