Skip to content

Commit f4f9bb2

Browse files
committed
Change plugin for vite i18n
1 parent 8be64e6 commit f4f9bb2

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"script:zip": "powershell scripts/zip.ps1"
1111
},
1212
"dependencies": {
13-
"@intlify/unplugin-vue-i18n": "^0.12.2",
1413
"chart.js": "^4.3.0",
1514
"date-fns": "^2.30.0",
1615
"rollup-plugin-copy": "^3.4.0",
@@ -19,6 +18,7 @@
1918
"vue-i18n": "^9.2.2"
2019
},
2120
"devDependencies": {
21+
"@intlify/vite-plugin-vue-i18n": "^7.0.0",
2222
"@kyvg/vue3-notification": "^2.9.1",
2323
"@types/webextension-polyfill": "^0.10.0",
2424
"@vitejs/plugin-vue": "^4.0.0",

src/compositions/show-notification.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Browser from 'webextension-polyfill';
2+
import { SECOND } from '../utils/time';
23

34
export enum NotificationType {
45
DailySummaryNotification = 'daily-summary-notification',
@@ -11,6 +12,7 @@ export async function showNotification(
1112
message: string,
1213
): Promise<void> {
1314
await Browser.notifications.clear(notificationType);
15+
await new Promise(res => setTimeout(res, 5 * SECOND));
1416
await Browser.notifications.create(notificationType, {
1517
type: 'basic',
1618
title: title,

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"lib": ["ESNext", "DOM"],
1313
"skipLibCheck": true,
1414
"noEmit": true,
15-
"types": ["@intlify/unplugin-vue-i18n/messages"]
1615
},
1716
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
1817
"references": [{ "path": "./tsconfig.node.json" }]

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'path';
33
import vue from '@vitejs/plugin-vue';
44
import webExtension, { readJsonFile } from 'vite-plugin-web-extension';
55
import pkg from './package.json';
6-
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
6+
import VueI18nPlugin from '@intlify/vite-plugin-vue-i18n';
77
import copy from 'rollup-plugin-copy';
88

99
const APPID_CHROME = 'hhfnghjdeddcfegfekjeihfmbjenlomm';

0 commit comments

Comments
 (0)