Added background script

This commit is contained in:
a 2020-07-23 21:00:54 +02:00
parent 0bae437009
commit 1eb88d524f
3 changed files with 4 additions and 1 deletions

1
src/background.ts Normal file
View file

@ -0,0 +1 @@
console.log("background script on");

View file

@ -4,7 +4,8 @@
"version": "0.1",
"browser_action": {
"browser_style": true,
"default_popup": "popup.html"
"default_popup": "popup.html",
"background": { "scripts": ["background.bundle.js"] }
},
"permissions": ["activeTab"]
}

View file

@ -11,6 +11,7 @@ let options = {
entry: {
popup: path.join(__dirname, "src", "popup", "popup.ts"),
content_script: path.join(__dirname, "src", "content_script.ts"),
background: path.join(__dirname, "src", "background.ts"),
},
output: {
path: path.resolve(__dirname, "dist"),