File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ // Global vars
2+ declare var __EXTENSION_MODE__ : ExtensionMode ;
3+ declare var __DEV__ : boolean ;
4+ declare var __PROD__ : boolean ;
5+ declare var __EXTENSION_VERSION__ : string ;
6+ declare var __REAL_APP_ID__ : string ;
Original file line number Diff line number Diff line change 11import { defineConfig } from "vite" ;
22import vue from "@vitejs/plugin-vue" ;
33import webExtension , { readJsonFile } from "vite-plugin-web-extension" ;
4+ import pkg from './package.json' ;
5+
6+ const APPID_CHROME = 'hhfnghjdeddcfegfekjeihfmbjenlomm' ;
47
58function generateManifest ( ) {
69 const manifest = readJsonFile ( "src/manifest.json" ) ;
@@ -21,7 +24,12 @@ export default defineConfig(({ mode }) => ({
2124 minify : false ,
2225 } ,
2326 define : {
24- 'process.env' : process . env
27+ 'process.env' : process . env ,
28+ __EXTENSION_MODE__ : JSON . stringify ( mode ) ,
29+ __DEV__ : mode === 'development' ,
30+ __PROD__ : mode === 'production' ,
31+ __EXTENSION_VERSION__ : JSON . stringify ( pkg . version ) ,
32+ __REAL_APP_ID__ : APPID_CHROME ,
2533 } ,
2634 plugins : [
2735 vue ( ) ,
You can’t perform that action at this time.
0 commit comments