Skip to content

Commit b7afdb2

Browse files
authored
Fix content script on Chrome v130+ (#642)
* Bump to @crxjs/[email protected] * Clean up old workaround * Pin runner to 20.04 * Add fixme on a blob preview test
1 parent fef1af7 commit b7afdb2

File tree

5 files changed

+54
-283
lines changed

5 files changed

+54
-283
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
build:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-22.04
1414
env:
1515
RELEASE: ${{ github.event.release.name }}
1616
RELEASE_ZIP: zoo-diff-viewer-extension_${{ github.event.release.name || github.sha }}.zip

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
},
6868
"devDependencies": {
6969
"@babel/runtime": "^7.23.9",
70-
"@crxjs/vite-plugin": "^1.0.14",
70+
"@crxjs/vite-plugin": "2.0.0-beta.26",
7171
"@playwright/test": "^1.43.1",
7272
"@vitejs/plugin-react": "^4.2.1",
7373
"dotenv": "^16.4.5",

tests/extension.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ test('blob preview with a .step file', async ({
147147
expect(screenshot).toMatchSnapshot()
148148
})
149149

150-
test('blob preview with an .stl file', async ({
150+
test.fixme('blob preview with an .stl file', async ({
151151
page,
152152
authorizedBackground,
153153
}) => {

vite.config.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,13 @@ import react from '@vitejs/plugin-react'
55
import { crx } from '@crxjs/vite-plugin'
66
import manifest from './manifest.json'
77

8-
const viteManifestHackIssue846: Plugin & {
9-
renderCrxManifest: (manifest: any, bundle: any) => void
10-
} = {
11-
// Workaround from https://github.com/crxjs/chrome-extension-tools/issues/846#issuecomment-1861880919.
12-
name: 'manifestHackIssue846',
13-
renderCrxManifest(_manifest, bundle) {
14-
bundle['manifest.json'] = bundle['.vite/manifest.json']
15-
bundle['manifest.json'].fileName = 'manifest.json'
16-
delete bundle['.vite/manifest.json']
17-
},
18-
}
19-
208
export default defineConfig(() => {
219
return {
2210
build: {
2311
outDir: 'build',
2412
},
2513
plugins: [
2614
react(),
27-
viteManifestHackIssue846,
2815
crx({ manifest }),
2916
nodePolyfills(),
3017
],

0 commit comments

Comments
 (0)