zhangwei пре 3 година
родитељ
комит
e8895d56e4
4 измењених фајлова са 17 додато и 147 уклоњено
  1. 1 7
      src/manifest.json
  2. 0 64
      src/manifest.pre.json
  3. 0 64
      src/manifest.production.json
  4. 16 12
      vue.config.js

+ 1 - 7
src/manifest.development.json → src/manifest.json

@@ -2,7 +2,7 @@
     "manifest_version": 3,
     "name": "DeNet",
     "description": "chrome extension",
-    "version": "0.0.1",
+    "version": "1.0.2",
     "background": {
         "service_worker": "/js/background.js"
     },
@@ -14,11 +14,6 @@
     },
     "action": {
         "default_popup": "popup.html"
-        // "default_icon": {
-        //     "16": "/logo/16.png",
-        //     "48": "/logo/48.png",
-        //     "128": "/logo/128.png"
-        // }
     },
     "content_scripts": [
         {
@@ -33,7 +28,6 @@
         }
     ],
       "host_permissions": [
-        // "*://*/*",
         "*://*.twitter.com/*",
         "*://twitter.com/*",
         "*://testh5.denetme.net/*",

+ 0 - 64
src/manifest.pre.json

@@ -1,64 +0,0 @@
-{
-    "manifest_version": 3,
-    "name": "DeNet",
-    "description": "chrome extension",
-    "version": "0.0.1",
-    "background": {
-        "service_worker": "/js/background.js"
-    },
-    "icons": {
-        "16": "/logo/16.png",
-        "32": "/logo/32.png",
-        "48": "/logo/48.png",
-        "128": "/logo/128.png"
-    },
-    "action": {
-        "default_popup": "popup.html"
-        // "default_icon": {
-        //     "16": "/logo/16.png",
-        //     "48": "/logo/48.png",
-        //     "128": "/logo/128.png"
-        // }
-    },
-    "content_scripts": [
-        {
-            "matches": [
-                "https://*.twitter.com/*",
-                "https://twitter.com/*"
-            ],
-            "run_at": "document_start",
-            "js": [
-                "/js/content.js"
-            ]
-        }
-    ],
-      "host_permissions": [
-        // "*://*/*",
-        "*://*.twitter.com/*",
-        "*://twitter.com/*",
-        "*://testh5.denetme.net/*",
-        "*://h5.denetme.net/*",
-        "*://preh5.denetme.net/*"
-    ],
-    "permissions": [
-        "tabs",
-        "action",
-        "cookies",
-        "activeTab",
-        "scripting",
-        "storage"
-    ],
-    "options_page": "options.html",
-    "web_accessible_resources": [
-        {
-            "resources": [
-                "/iframe/publish.html",
-                "/iframe/red-packet.html",
-                "/iframe/home.html"
-            ],
-            "matches": [
-                "<all_urls>"
-            ]
-        }
-    ]
-}

+ 0 - 64
src/manifest.production.json

@@ -1,64 +0,0 @@
-{
-    "manifest_version": 3,
-    "name": "DeNet",
-    "description": "chrome extension",
-    "version": "0.0.1",
-    "background": {
-        "service_worker": "/js/background.js"
-    },
-    "icons": {
-        "16": "/logo/16.png",
-        "32": "/logo/32.png",
-        "48": "/logo/48.png",
-        "128": "/logo/128.png"
-    },
-    "action": {
-        "default_popup": "popup.html"
-        // "default_icon": {
-        //     "16": "/logo/16.png",
-        //     "48": "/logo/48.png",
-        //     "128": "/logo/128.png"
-        // }
-    },
-    "content_scripts": [
-        {
-            "matches": [
-                "https://*.twitter.com/*",
-                "https://twitter.com/*"
-            ],
-            "run_at": "document_start",
-            "js": [
-                "/js/content.js"
-            ]
-        }
-    ],
-      "host_permissions": [
-        // "*://*/*",
-        "*://*.twitter.com/*",
-        "*://twitter.com/*",
-        "*://testh5.denetme.net/*",
-        "*://h5.denetme.net/*",
-        "*://preh5.denetme.net/*"
-    ],
-    "permissions": [
-        "tabs",
-        "action",
-        "cookies",
-        "activeTab",
-        "scripting",
-        "storage"
-    ],
-    "options_page": "options.html",
-    "web_accessible_resources": [
-        {
-            "resources": [
-                "/iframe/publish.html",
-                "/iframe/red-packet.html",
-                "/iframe/home.html"
-            ],
-            "matches": [
-                "<all_urls>"
-            ]
-        }
-    ]
-}

+ 16 - 12
vue.config.js

@@ -60,18 +60,18 @@ const isDevMode = process.env.NODE_ENV === 'development'
 module.exports = {
   pages,
   filenameHashing: false,
-  chainWebpack: (config) => {
-    config.plugin('copy').use(require('copy-webpack-plugin'), [
-      {
-        patterns: [
-          {
-            from: path.resolve(`src/manifest.${process.env.NODE_ENV}.json`),
-            to: `${path.resolve('dist')}/manifest.json`
-          }
-        ]
-      }
-    ])
-  },
+  // chainWebpack: (config) => {
+  //   config.plugin('copy').use(require('copy-webpack-plugin'), [
+  //     {
+  //       patterns: [
+  //         {
+  //           from: path.resolve(`src/manifest.json`),
+  //           to: `${path.resolve('dist')}/manifest.json`
+  //         }
+  //       ]
+  //     }
+  //   ])
+  // },
   configureWebpack: {
     resolve: {
       alias: {
@@ -95,6 +95,10 @@ module.exports = {
           {
             from: 'src/assets/logo',//想要复制的文件夹
             to: `${path.resolve('dist')}/logo` //复制在哪个文件夹
+          },
+          {
+            from: path.resolve(`src/manifest.json`),
+            to: `${path.resolve('dist')}/manifest.json`
           }
         ]
       })