This feature requires Mellowtel version 1.6.2 or higher. This is a breaking change compared to previous versions.
Installation
First, install the required npm package using your preferred package manager:Using npm
Using yarn
Using pnpm
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 themeucci.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 themeucci.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 abuild-meucci.js
file in your project root with the following content:
3. Update package.json
Add the following to yourpackage.json
file:
- 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"
Update initContentScript
For both implementations, modify yourinitContentScript
method in the content script to include the correct path to the Meucci file: