Skip to content

Commit 20e2288

Browse files
committed
Update package.json scripts
1 parent 9a17910 commit 20e2288

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite build --mode development --watch",
8-
"build": "vue-tsc && vite build"
8+
"start": "vite build --watch --mode production",
9+
"build": "pnpm compile && vite build --mode production",
10+
"script:build": "powershell scripts/build.ps1",
11+
"script:zip": "powershell scripts/zip.ps1"
912
},
1013
"dependencies": {
1114
"tailwind": "^4.0.0",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Tab } from "../storage/tab";
1+
import { Tab } from "../entity/tab";
22
import Browser from 'webextension-polyfill';
33

44
export interface ITabsRepository {
55
getTab(domain:string): Tab | undefined;
6-
addTab(tab:Browser.Tabs.Tab): void;
6+
addTab(tab:Browser.Tabs.Tab): Promise<void>;
77
}

src/storage/local-storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { IStorage } from "./storage-interface";
22
import { StorageParams } from "./storage-params";
3-
import { Tab } from "./tab";
3+
import { Tab } from "../entity/tab";
44
import Browser from 'webextension-polyfill';
55

66
export class LocalStorage implements IStorage {

src/storage/storage-interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { StorageParams } from "./storage-params";
2-
import { Tab } from "./tab";
2+
import { Tab } from "../entity/tab";
33

44
export interface IStorage {
55
getTabs(): Promise<Tab[]>;

vite.config.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,20 @@ function generateManifest() {
1414
}
1515

1616
// https://vitejs.dev/config/
17-
export default defineConfig({
17+
export default defineConfig(({ mode }) => ({
18+
build: {
19+
emptyOutDir: true,
20+
sourcemap: mode === 'development' ? 'inline' : false,
21+
minify: false,
22+
},
1823
plugins: [
1924
vue(),
2025
webExtension({
2126
manifest: generateManifest,
2227
watchFilePaths: ["package.json", "manifest.json"],
2328
}),
2429
],
25-
});
30+
optimizeDeps: {
31+
include: ['vue', 'webextension-polyfill'],
32+
},
33+
}));

0 commit comments

Comments
 (0)