Explorar el Código

Use imports instead of require

jherve hace 1 año
padre
commit
807862b2c6
Se han modificado 2 ficheros con 2 adiciones y 10 borrados
  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();