Browse Source

Use imports instead of require

jherve 1 year ago
parent
commit
807862b2c6
2 changed files with 2 additions and 10 deletions
  1. 1 5
      src/background.js
  2. 1 5
      src/content.js

+ 1 - 5
src/background.js

@@ -1,7 +1,3 @@
-var Background = require("../output/ExampleWebExt.Background");
-
-function main() {
-  Background.main();
-}
+import { main } from "../output/ExampleWebExt.Background";
 
 main();

+ 1 - 5
src/content.js

@@ -1,7 +1,3 @@
-var Content = require("../output/ExampleWebExt.Content");
-
-function main() {
-    Content.main();
-}
+import { main } from "../output/ExampleWebExt.Content";
 
 main();