Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Refactor react entrypoint (#581)

Leendert de Borst9b8da648581f
diff --git a/.github/workflows/browser-extension-build.yml b/.github/workflows/browser-extension-build.yml
index 2333b829a..5653b3a94 100644
--- a/.github/workflows/browser-extension-build.yml
+++ b/.github/workflows/browser-extension-build.yml
@@ -30,7 +30,7 @@ jobs:
run: npm ci
- name: Build extension
- run: npm run build
+ run: npm run build:chrome
- name: Run tests
run: npm run test
diff --git a/browser-extension/README.md b/browser-extension/README.md
index af86da230..d73a2442b 100644
--- a/browser-extension/README.md
+++ b/browser-extension/README.md
@@ -8,10 +8,13 @@ To build the browser extension, run the following command in this directory:
```bash
npm install
-npm run build
-```
-This will build the browser extension and save it in the `dist/chrome-mv3` folder.
+# Build the Chrome extension (saves in dist/chrome-mv3)
+npm run build:chrome
+
+# Build the Firefox extension (saves in dist/firefox-mv2)
+npm run build:firefox
+```
To load the browser extension in Chrome, follow these steps:
diff --git a/browser-extension/package.json b/browser-extension/package.json
index db70785d2..5f60c7db9 100644
--- a/browser-extension/package.json
+++ b/browser-extension/package.json
@@ -5,9 +5,8 @@
"version": "0.0.0",
"type": "module",
"scripts": {
- "dev": "wxt",
+ "dev:chrome": "wxt -b chrome",
"dev:firefox": "wxt -b firefox",
- "build": "wxt build",
"build:chrome": "wxt build -b chrome",
"build:firefox": "wxt build -b firefox",
"test": "vitest",
diff --git a/browser-extension/src/entrypoints/popup/index.html b/browser-extension/src/entrypoints/popup/index.html
index c576d4b69..6799776dc 100644
--- a/browser-extension/src/entrypoints/popup/index.html
+++ b/browser-extension/src/entrypoints/popup/index.html
@@ -5,9 +5,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AliasVault</title>
<link href="~/assets/tailwind.css" rel="stylesheet" />
+ <meta name="manifest.type" content="browser_action" />
</head>
<body class="bg-white dark:bg-gray-900">
<div id="root"></div>
- <script type="module" src="./Index.tsx"></script>
+ <script type="module" src="./main.tsx"></script>
</body>
</html>
diff --git a/browser-extension/src/entrypoints/popup/Index.tsx b/browser-extension/src/entrypoints/popup/main.tsx
similarity index 100%
rename from browser-extension/src/entrypoints/popup/Index.tsx
rename to browser-extension/src/entrypoints/popup/main.tsx