Earn more by enabling an additional feature: Meucci
This feature requires Mellowtel version 1.6.2 or higher. This is a breaking change compared to previous versions.
Mellowtel provides an optional feature that allows you to handle more requests and therefore earn more. This feature is called “Meucci”.
Installation
First, install the required npm package using your preferred package manager:
Using npm
Using yarn
Using pnpm
Below are instructions for enabling the Meucci feature in your browser plugin, with options for both standard and Plasmo framework implementations.
Standard Implementation
1. Create a JavaScript file named meucci.js
In the src directory, or wherever you have js files, create a file named meucci.js
and add the following code. Ensure this file gets included in your final build (/dist) directory.
If you followed the initial webpack config setup, you can simply add this file to the entry
object in your webpack config.
2. Update your webpack config
Make sure your final build directory includes the meucci.js
file.
If you followed the initial webpack config setup, you can simply add this file to the entry
object in your webpack config.
3. Update manifest.json
Add the meucci.js
file to your manifest.json
as web_accessible_resources:
Plasmo Framework Implementation
If you’re using the Plasmo framework, follow these alternative steps:
1. Create a TypeScript file named meucci.ts
In the src directory, or wherever you have ts files, create a file named meucci.ts
and add the following code:
2. Create Build Script
Create a build-meucci.js
file in your project root with the following content:
3. Update package.json
Add the following to your package.json
file:
You can either:
- Run the build script manually after your main build:
npm run build:meucci
- Or append it to your existing build script with
&
:"build": "your-existing-build-command & npm run build:meucci"
This will ensure the Meucci file is properly bundled and copied to all build directories in the correct Plasmo structure.
Update initContentScript
For both implementations, modify your initContentScript
method in the content script to include the correct path to the Meucci file:
For Plasmo framework, you can use the following:
If you also have Pascoli enabled, you can use the following: