-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor firebase-hosting-merge.yml to include environment variables …
…for Sentry and Firebase secrets
- Loading branch information
1 parent
321b5bf
commit d1a709f
Showing
4 changed files
with
45 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
import { defineConfig } from 'vite' | ||
import { defineConfig, loadEnv } from 'vite' | ||
import { sentryVitePlugin } from '@sentry/vite-plugin' | ||
import { serwist } from '@serwist/vite' | ||
import react from '@vitejs/plugin-react-swc' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
react(), | ||
sentryVitePlugin({ | ||
org: 'sensasi-apps', | ||
project: 'simulasi-grading-sawit', | ||
}), | ||
serwist({ | ||
swSrc: 'src/sw.ts', | ||
swDest: 'sw.js', | ||
globDirectory: 'dist', | ||
injectionPoint: 'self.__SW_MANIFEST', | ||
rollupFormat: 'iife', | ||
}), | ||
], | ||
export default defineConfig(({ mode }) => { | ||
const env = loadEnv(mode, process.cwd()) | ||
|
||
build: { | ||
sourcemap: true, | ||
}, | ||
return { | ||
plugins: [ | ||
react(), | ||
sentryVitePlugin({ | ||
org: 'sensasi-apps', | ||
project: 'simulasi-grading-sawit', | ||
authToken: env.VITE_SENTRY_AUTH_TOKEN, | ||
}), | ||
serwist({ | ||
swSrc: 'src/sw.ts', | ||
swDest: 'sw.js', | ||
globDirectory: 'dist', | ||
injectionPoint: 'self.__SW_MANIFEST', | ||
rollupFormat: 'iife', | ||
}), | ||
], | ||
|
||
build: { | ||
sourcemap: true, | ||
}, | ||
} | ||
}) |