Skip to content

Commit 5c8f75c

Browse files
committed
browser-polyfill 제거 및 빌드수정
1 parent 256e7a8 commit 5c8f75c

File tree

8 files changed

+16
-20
lines changed

8 files changed

+16
-20
lines changed

.swcrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"jsc": {
3+
"parser": {
4+
"syntax": "typescript",
5+
"tsx": false,
6+
"dynamicImport": false,
7+
"decorators": false
8+
},
9+
"target": "es2019"
10+
}
11+
}

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"rimraf": "3.0.2",
3232
"swc-loader": "^0.1.14",
3333
"typescript": "^4.3.5",
34-
"web-ext-types": "^3.2.1",
3534
"webpack": "^5.46.0",
3635
"webpack-cli": "^4.7.2"
3736
},

src/manifest-v3.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"https://*.twitter.com/i/tweetdeck_release_notes"
3737
],
3838
"css": ["styles/komposer.css"],
39-
"js": ["vendor/browser-polyfill.min.js", "scripts/loader.js"]
39+
"js": ["scripts/loader.js"]
4040
}
4141
],
4242

src/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"https://*.twitter.com/i/tweetdeck_release_notes"
3636
],
3737
"css": ["styles/komposer.css"],
38-
"js": ["vendor/browser-polyfill.min.js", "scripts/loader.js"]
38+
"js": ["scripts/loader.js"]
3939
}
4040
],
4141

src/scripts/loader.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ async function injectScript(src) {
1010
}
1111

1212
function* getScriptPaths() {
13-
const resources = browser.runtime.getManifest().web_accessible_resources
13+
const resources = chrome.runtime.getManifest().web_accessible_resources
1414
for (const resource of resources) {
1515
if (typeof resource === 'string') {
1616
// Manifest V2
@@ -27,7 +27,7 @@ async function loadScripts() {
2727
if (!path.endsWith('.js')) {
2828
continue
2929
}
30-
const src = browser.runtime.getURL(path)
30+
const src = chrome.runtime.getURL(path)
3131
await injectScript(src)
3232
}
3333
}

src/vendor/browser-polyfill.min.js

-9
This file was deleted.

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
"emitDecoratorMetadata": true,
2323
"resolveJsonModule": true,
2424
"allowSyntheticDefaultImports": true,
25-
"typeRoots": ["node_modules/@types", "node_modules/web-ext-types", "src/scripts/types"]
25+
"typeRoots": ["node_modules/@types", "src/scripts/types"]
2626
}
2727
}

yarn.lock

-5
Original file line numberDiff line numberDiff line change
@@ -2890,11 +2890,6 @@ watchpack@^2.2.0:
28902890
glob-to-regexp "^0.4.1"
28912891
graceful-fs "^4.1.2"
28922892

2893-
web-ext-types@^3.2.1:
2894-
version "3.2.1"
2895-
resolved "https://registry.yarnpkg.com/web-ext-types/-/web-ext-types-3.2.1.tgz#3edc0e3c2e8fe121d7d7e4ca0b7ee0c883cea832"
2896-
integrity sha512-oQZYDU3W8X867h8Jmt3129kRVKklz70db40Y6OzoTTuzOJpF/dB2KULJUf0txVPyUUXuyzV8GmT3nVvRHoG+Ew==
2897-
28982893
webpack-cli@^4.7.2:
28992894
version "4.7.2"
29002895
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.7.2.tgz#a718db600de6d3906a4357e059ae584a89f4c1a5"

0 commit comments

Comments
 (0)