DEV Community

Cover image for Create Chrome Extension Using Vue The Easiest Way
Jenuel Oras Ganawed
Jenuel Oras Ganawed

Posted on • Edited on • Originally published at jenuel.dev

Create Chrome Extension Using Vue The Easiest Way

Let us first create a new project by running this command and answer some of the questions. For this example, I'm going to press enter on everything.

npm init vue@latest
Enter fullscreen mode Exit fullscreen mode

image here vue extension

Then we can now go to our project by cd vue-project and let us install our packages. For me I am going to use yarn to install dependences, and then yarn dev to run the project.

cd vue-project && yarn && yarn dev
Enter fullscreen mode Exit fullscreen mode

It should run, and show something like this, it means our app is working fine.

image here vue extension

Now, that our app is working properly. Create a manifest.json inside the public folder with this content something like this, also make sure to create/add your Logo.png file in the public folder. And You can change the content of this manifest.json file.

{
    "manifest_version": 3,
    "name": "BroJ Extension Example",
    "description": "This is our sample extension",
    "version": "1.0",
    "action": {
        "default_popup": "index.html",
        "default_icon": "Logo.png"
    }
}
Enter fullscreen mode Exit fullscreen mode

image here vue extension

Thats It! now to test it out, lets run this command to build.

yarn build
Enter fullscreen mode Exit fullscreen mode

Now, open your Chrome browser and go to chrome://extensions/ and make sure to toggle developer mode.

image here vue extension

and then click load unpacked and select your dist folder of your vue project.

image here vue extensionimage here vue extension

Then after adding dist. A new extension will be added that looks like this.

image here vue extension

And then you now click pin your extension to show your extension icon. For me I have this icon, so after pinning it I can just open my extension by clicking it.

image here vue extension

THAT'S IT! 🙌😁 Now, you can just modify the content you want to show. This is a sample of what I created. Here is the source Code: https://github.com/BroJenuel/BroJenuelBlogChromeExtension. This is my extension. I don't like sending annoying emails to my readers, but if you want to be updated on my latest articles, you can use this extension BroJenuelArticle-Extension Download.

image here vue extension

If you like to publish your extension, you can read how to publish here: https://developer.chrome.com/docs/webstore/publish/.

Cheers! and have a great day! 😁❤️‍🩹🍻


If you enjoy this article and would like to show your support, you can easily do so by buying me a coffee. Your contribution is greatly appreciated!

Jenuel Ganawed Buy me Coffee

Top comments (4)

Collapse
 
supportic profile image
Supportic

Thank you for contributing your knowledge. Please keep all relevant content on this portal instead of providing backlinks.
See 11. Content Policy

Collapse
 
jenueldev profile image
Jenuel Oras Ganawed

Sorry, Yup updated the content.

Collapse
 
sloan profile image
Sloan the DEV Moderator

Hi there, we encourage authors to share their entire posts here on DEV, rather than mostly pointing to an external link. Doing so helps ensure that readers don’t have to jump around to too many different pages, and it helps focus the conversation right here in the comments section.

If you choose to do so, you also have the option to add a canonical URL directly to your post.

Collapse
 
jenueldev profile image
Jenuel Oras Ganawed

Sorry, Yup updated the content.