add new environment variable to control "quiet" option of msw
This commit is contained in:
@@ -2,3 +2,4 @@
|
||||
VITE_UMBRACO_USE_MSW=on # on = turns on MSW, off = disables all mock handlers
|
||||
VITE_UMBRACO_API_URL=http://localhost:11000
|
||||
VITE_UMBRACO_INSTALL_STATUS=running # running or must-install or must-upgrade
|
||||
VITE_MSW_QUIET=off # on = turns off MSW console logs, off = turns on MSW console logs
|
||||
|
||||
@@ -16,4 +16,5 @@ export const onUnhandledRequest = (req: MockedRequest) => {
|
||||
export const startMockServiceWorker = () =>
|
||||
worker.start({
|
||||
onUnhandledRequest,
|
||||
quiet: import.meta.env.VITE_MSW_QUIET === 'on',
|
||||
});
|
||||
|
||||
1
src/Umbraco.Web.UI.Client/src/vite-env.d.ts
vendored
1
src/Umbraco.Web.UI.Client/src/vite-env.d.ts
vendored
@@ -4,4 +4,5 @@ interface ImportMetaEnv {
|
||||
VITE_UMBRACO_INSTALL_STATUS: 'running' | 'must-upgrade' | 'must-install';
|
||||
VITE_UMBRACO_API_URL: string;
|
||||
VITE_UMBRACO_USE_MSW: 'on' | 'off';
|
||||
VITE_MSW_QUIET: 'on' | 'off';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user