Ver código fonte

Use imports instead of require

jherve 1 ano atrás
pai
commit
807862b2c6
2 arquivos alterados com 2 adições e 10 exclusões
  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();
 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();
 main();