Skip to content

Commit

Permalink
修复js值是空时加载报错
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkRealize authored Aug 4, 2023
1 parent 425bd3b commit 6e64380
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ const manifest: Manifest.WebExtensionManifest = {
service_worker: 'js/background.js',
},
content_scripts: [
{
matches: ['<all_urls>'],
js: [...(__DEV__ ? [] : ['js/vendor.js'])],
},
{
matches: ['https://github.com/*'],
css: ['css/all.css'],
Expand All @@ -53,5 +49,11 @@ const manifest: Manifest.WebExtensionManifest = {
'128': 'icons/extension-icon-x128.png',
},
};
if (!__DEV__) {
manifest.content_scripts?.unshift({
matches: ['<all_urls>'],
js: ['js/vendor.js'],
});
}

export default manifest;

0 comments on commit 6e64380

Please sign in to comment.