Skip to content

Commit 78ffaec

Browse files
committed
Fix ES module path resolution in browser scripts and clean up pnpm workspace config
- remove [Pasted text], rename `finished in` to `built in` └── apps └── browser ├── package.json ├── scripts │ ├── build.mjs │ ├── create-firefox-build.ts │ └── create-zip-archives.ts ├── src │ └── manifest.json ├── tsconfig.json └── vite.config.ts
1 parent e222aab commit 78ffaec

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎apps/browser/scripts/build.mjs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const start_time = Date.now()
2-
console.log('Building...')
32

43
import * as fs from 'node:fs'
54
import * as path from 'node:path'
@@ -24,7 +23,7 @@ const run = async () => {
2423
const finish = (target) => {
2524
if (pending.delete(target) && pending.size == 0) {
2625
const time = ((Date.now() - start_time) / 1000).toFixed(1)
27-
console.log(`Finished in ${time}s.`)
26+
console.log(`Built in ${time}s.`)
2827
}
2928
}
3029

‎apps/browser/scripts/create-firefox-build.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import * as fs from 'fs'
22
import * as path from 'path'
3+
import { fileURLToPath } from 'url'
4+
5+
const __filename = fileURLToPath(import.meta.url)
6+
const __dirname = path.dirname(__filename)
37

48
const manifest_path = path.join(__dirname, '..', 'src', 'manifest.json')
59
const manifest = JSON.parse(fs.readFileSync(manifest_path, 'utf8'))

‎apps/browser/scripts/create-zip-archives.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import * as fs from 'fs'
22
import * as path from 'path'
33
import archiver from 'archiver'
4+
import { fileURLToPath } from 'url'
5+
6+
const __filename = fileURLToPath(import.meta.url)
7+
const __dirname = path.dirname(__filename)
48

59
const get_version = (): string => {
610
const manifest_path = path.join(__dirname, '..', 'src', 'manifest.json')

‎pnpm-workspace.yaml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@ allowBuilds:
66
'@swc/core': true
77
'@vscode/vsce-sign': true
88
bufferutil: true
9-
core-js-pure: true
109
esbuild: true
11-
keytar: true
1210
utf-8-validate: true

0 commit comments

Comments
 (0)