vue-cli-plugin-browser-extension | Browser extension development plugin
kandi X-RAY | vue-cli-plugin-browser-extension Summary
kandi X-RAY | vue-cli-plugin-browser-extension Summary
Browser extension development plugin for vue-cli 3.0
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vue-cli-plugin-browser-extension
vue-cli-plugin-browser-extension Key Features
vue-cli-plugin-browser-extension Examples and Code Snippets
Community Discussions
Trending Discussions on vue-cli-plugin-browser-extension
QUESTION
ANSWER
Answered 2021-Mar-29 at 13:23SOLVED
Using the Vuejs dev tools electron app
QUESTION
I'm trying to figure out what is the way to use hierarchical dependencies in node.
I'm building a VueJs chrome extension using Vue CLI and vue-cli-plugin-browser-extension (https://www.npmjs.com/package/vue-cli-plugin-browser-extension). In the background file I need to use two dependencies:
- jquery
- table-to-json (https://www.npmjs.com/package/table-to-json)
table-to-json needs jquery in order to work
I installed the two dependency using node install and require the dependencies in the background fild. But when I try to run the background script I get this error:
background.js:37 Uncaught ReferenceError: jQuery is not defined at Object.f370 (background.js:37) at n (background.js:1) at Object.fe77 (background.js:37) at n (background.js:1) at Object.1 (background.js:1) at n (background.js:1) at background.js:1 at background.js:1 f370 @ background.js:37 n @ background.js:1 fe77 @ background.js:37 n @ background.js:1 1 @ background.js:1 n @ background.js:1 (anonymous) @ background.js:1 (anonymous) @ background.js:1 DevTools failed to load SourceMap: Could not load content for chrome-extension://ljejdkiepkafbpnbacemjjcleckglnjl/js/background.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
table-to-json is not able to see jquery. What am I missing?
This is my background file, package.json and vue.config.js:
backgroung.js
...ANSWER
Answered 2020-May-02 at 10:01The problem isn't applicable to Node dependencies in general. table-to-json
is legacy jQuery plugin and relies on jQuery globals instead of JavaScript modules. It expects jQuery
variable to exist in the scope where the plugin is executed.
This can be achieved by exposing jQuery globals explicitly:
QUESTION
I'm trying to implement a JSON viewer chrome extension. I already have the Viewer implemented with Vue (http://treedoc.org). Now the problem is how can I can inject the Vue page with Chrome extension content script.
I found this post is very helpful to inject normal javascript file in the extension. But this is with a known javascript file name.
I found this post and this vue-cli-plugin-browser-extension is helpful to use Vue for extension options page and override page, etc, as the entry point for them are HTML files. but the content script entry point is a javascript, to inject a javascript file in the content script, you need to know the exact file name. With the plugin and Webpack, the generated javascript files are appended with hash such as "override.0e5e7d0a.js" which is not known upfront.
...ANSWER
Answered 2020-Jan-20 at 08:55The vue-cli-plugin-browser-extension
does not include a hash in the filename of content scripts, so no need to worry.
To add content scripts, configure the plugin's componentOptions.contentScripts
, as shown in this example (generated from vue add browser-extension
from the root of a Vue CLI project):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vue-cli-plugin-browser-extension
No Installation instructions are available at this moment for vue-cli-plugin-browser-extension.Refer to component home page for details.
Support
If you have any questions vist the community on GitHub, Stack Overflow.
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page