Skip to content

Commit 9e78c84

Browse files
committed
switch to vite
1 parent d71cb15 commit 9e78c84

13 files changed

Lines changed: 4595 additions & 268 deletions

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: npm ci
2424

2525
- name: Build extension
26-
run: npm run build
26+
run: npm run prod
2727

2828
- name: Package extension
2929
run: |

build.js

Lines changed: 0 additions & 237 deletions
This file was deleted.

build.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { execSync } from 'child_process';
2+
3+
function run(cmd) {
4+
execSync(cmd, { stdio: 'inherit', stderr: 'inherit' });
5+
}
6+
7+
const isProd = process.argv.find(arg => arg === "prod");
8+
const passes = isProd ? "--passes=10" : "--passes=1";
9+
10+
run("node ./scripts/preBuild.mjs");
11+
run(`npx vite build --config vite/vite.content.config.js -- ${passes}`);
12+
run(`npx vite build --config vite/vite.background.config.js -- ${passes}`);
13+
run(`npx vite build --config vite/vite.intercept.config.js -- ${passes}`);
14+
run(`npx vite build --config vite/vite.css.config.js`);
15+
run("node ./scripts/postBuild.mjs");

0 commit comments

Comments
 (0)