Chrome Extension Boilerplate with SolidJS + Vite + TypeScript + Manifest V3 + HMR

Overview

mv3-solid-chrome-extension-template

chrome-extension development template with firebase

Support

  • Chrome Extension
  • Manifest V3
  • SolidJS
  • Typescript
  • HMR
  • Firebase Authentication

Quick Start

Install

git clone https://github.com/munron/mv3-solid-chrome-extension-template.git
cd mv3-vue-solid-extension-template
npm install
mv .env.sample .env

Fix Extension ID

Open chrome://extensions

Click Pack Extension

Click Browse and select dist folder

dist.crx and dist.pem are generated.

Edit .env

Copy private key from dist.pem and paste to VITE_MV3_KEY

VITE_FIREBASE_APIKEY=XXXXXXXX
VITE_FIREBASE_AUTHDOMAIN=XXXXXXXX
VITE_FIREBASE_PROJECTID=XXXXXXXX
VITE_FIREBASE_STORAGEBUCKET=XXXXXXXX
VITE_FIREBASE_MESSAGINGSENDERID=XXXXXXXX
VITE_FIREBASE_APPID=XXXXXXXX
VITE_MEASUREMENTID=XXXXXXXX
VITE_OAUTH2_CLIENT_ID=XXXXXXXX
VITE_MV3_KEY="-----BEGIN PRIVATE KEY-----\nXXXXX.....XXXXXX\n....\nXXXXXX.....XXXXXXX\n-----END PRIVATE KEY-----"

Setup Firebase

Create New Project

https://console.firebase.google.com

Copy Firebase Configuration to .env

const firebaseConfig = {
   apiKey: "XXX",
   authDomain: "XXX",
   projectId: "XXX",
   storageBucket: "XXX",
   messagingSenderId: "XXX",
   appId: "XXX",
   measurementId: "XXX"
};

Add Google to Sign-in provider

Build → Authentication → Sign-in method → Google → Save

Add domain

Build → Authentication → Settings → Add domain
domain: chrome-extension://{Chrome Extension ID}

Setup Google Cloud Platform

Open https://console.cloud.google.com/

Open API&Service → Credential → +CREATE CREDENTIALS → OAuth Client ID

Select Chrome App, fill Name and Application ID (Chrome Extension ID)

Edit .env.

Copy Your Client Id to VUE_APP_OAUTH2_CLIENT_ID

Edit rollup.config.js.

Uncomment oauth2 settings.

chromeExtension({
  extendManifest: {
    "oauth2": {
      "client_id": process.env.VITE_OAUTH2_CLIENT_ID,
      "scopes": [
        "https://www.googleapis.com/authuserinfo.email",
        "https://www.googleapis.com/authuserinfo.profile"
      ]
    },
    "key": process.env.VITE_MV3_KEY
  }
}),

HMR

npm run dev

Build

npm run build

You might also like...

A form management library for SolidJS that is very lightweight and simple!

solform A form management library for SolidJS that is very lightweight and simple! Why solform Very easy, fast, lightweight and powerful! It has built

Nov 15, 2022

Solidex is a list of SolidJS ecosystem resources and packages.

Solidex is a list of SolidJS ecosystem resources and packages.

Solidex The following is a list of articles, packages and other resources that focus on the SolidJS ecosystem. Solidex is a platform for listing and m

Dec 18, 2022

A modern solidjs based UI library ~ it is very lightweight!

🚧 目前正在开发中,敬请期待~ cerises-ui 一个现代的基于 solidjs 的 UI 库~它是非常轻量级的! 官网:https://cerises-ui.edoc.wiki 目前计划组件 组件 说明 认领人 进度 Review & Unit Test Button、ButtonGroup

Jul 19, 2022

Utility to track the boundaries of html-elements in SolidJS

solid-boundaries Helps you to track the size and position of html-elements in solid-js. What does it do? See it in action here, or see it on CodeSandb

Jan 6, 2023

A SolidJS template built with Hope-UI

solid-hope-admin 名称 简介 solid JavaScript框架 hope-ui UI组件库 solid-app-router 路由 vite-plugin-pages 自动生成文件路由 query-string 解析URL地址 steeze-ui/solid-icon 图标 功能

Dec 13, 2022

A library of high-quality primitives that help you build accessible user interfaces with SolidJS.

Solid Aria A library of high-quality primitives that help you build accessible user interfaces with SolidJS. Primitives @solid-aria/primitives - Expor

Jan 7, 2023

A SolidJS starter template with solid-labels, solid-sfc and solid-styled

solid-sfc-styled-labels-starter This is a SolidJS starter template for easily setting up solid-sfc, solid-styled and solid-labels. Development Install

Mar 25, 2022

Cache Solidjs resources by key (derived from the resource source)

Solid Cached Resource (Experimental) Create a solid resource attached to a cached state by a unique key. Heavily inspired by react-query, but for soli

Dec 31, 2022

Template for building SolidJS web application with Tailwind CSS faster!

Template for building SolidJS web application with Tailwind CSS faster!

Hardtail Template for building SolidJS web application with Tailwind CSS faster! Setup First you could clone or fork this project or repository to you

Sep 18, 2022
Owner
munron
munron
Modify Request & Response Headers Chrome Extension (Manifest V3)

Modify request & response headers (Chrome Extension Manifest V3) This Chrome extension will add request header and response header to few network requ

Requestly 6 Dec 9, 2022
Vite plugin to client bundle i18next locales composited from one to many json/yaml files from one to many libraries. Zero config HMR support included.

vite-plugin-i18next-loader yarn add -D vite-plugin-i18next-loader Vite plugin to client bundle i18next locales composited from one to many json/yaml f

AlienFast 4 Nov 30, 2022
Chrome extension to generate tests for solidjs.

Solid Test Recorder Automated Chrome extension to generate unit/integration tests for solidjs Features Generates UI tests which relay on vitest and ms

Chris Czopp 14 Dec 16, 2022
This project is a boilerplate for Next and TypeScript projects. This template was built with Vite, TypeScript and Stitches.

Awesome Template Stitches — NextJS, TypeScript, Stitches and Design Tokens Summary About this template Avaliale scripts Other scripts available Main t

Diego Silva 14 Dec 29, 2022
esbuild plugin to generate mix-manifest.json file compatible with Laravel Mix.

esbuild-mix-manifest-plugin An esbuild plugin to generate a mix-manifest.json compatible with Laravel Mix. Installation You can install the plugin via

Stefan Zweifel 6 Dec 25, 2022
VSCode extension with helpful code snippets for SolidJS.

Solid Snippets VSCode extension with helpful code snippets for SolidJS. GET THE EXTENSION Snippets Trigger Content Languages JSX sinput→ Input two-way

SolidJS Community 11 Dec 8, 2022
Eth-explorers-extension - Chrome extension to open Ethereum addresses & transaction hash from any page on popular explorers + dashboards

eth-explorers-extension(s) This repository contains two folders with two extensions that work for address and transactions respectively. 1. eth-addres

Apoorv Lathey 71 Jan 6, 2023
🚀 A web extension starter built with React, Typescript, and Tailwind CSS. Build once, and run on multiple browsers: Google Chrome, Mozilla Firefox, Microsoft Edge, Brave, and Opera..

Web Extension Starter A web extension starter, built with React, Typescript, and Tailwind CSS. Build once, and run on multiple browsers: Google Chrome

BCIT Design & Development Club (BCIT-DDC) 28 Dec 28, 2022
A boilerplate for ExpressJs projects configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses Mongodb.

ExpressJs-Boilerplate An ExpressJs boilerplate configured with ESLint, Prettier & Airbnb Setup. The boilerplate utilises RESTful architecture and uses

Hammas bin Farrukh 4 Mar 8, 2023
Unstyled, dev error overlays for SolidJS

solid-error-overlay Unstyled, headless Error Overlay for SolidJS Install npm i solid-error-overlay yarn add solid-error-overlay pnpm add solid-error-o

Alexis H. Munsayac 20 Dec 29, 2022