mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-22 02:16:39 +02:00
feat: support furigana and romaji generation on web (#2232)
* feat: support furigana and romaji generation on web
This commit is contained in:
@@ -3,6 +3,7 @@ import { defineConfig, normalizePath } from 'vite';
|
||||
import { ViteEjsPlugin } from 'vite-plugin-ejs';
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
|
||||
import { kuromojiDictionaryPlugin } from './vite.kuromoji-plugin';
|
||||
import { createReactPlugin } from './vite.react-plugin';
|
||||
|
||||
export default defineConfig({
|
||||
@@ -65,6 +66,7 @@ export default defineConfig({
|
||||
},
|
||||
plugins: [
|
||||
createReactPlugin(),
|
||||
kuromojiDictionaryPlugin(),
|
||||
ViteEjsPlugin({
|
||||
root: normalizePath(path.resolve(__dirname, './src/renderer')),
|
||||
web: true,
|
||||
@@ -134,6 +136,7 @@ export default defineConfig({
|
||||
workbox: {
|
||||
cleanupOutdatedCaches: true,
|
||||
clientsClaim: true,
|
||||
globIgnores: ['**/kuromoji/**'],
|
||||
maximumFileSizeToCacheInBytes: 1000000 * 5, // 5 MB
|
||||
skipWaiting: true,
|
||||
},
|
||||
@@ -142,9 +145,14 @@ export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
'/@/i18n': path.resolve(__dirname, './src/i18n'),
|
||||
'/@/lyrics-conversion-api': path.resolve(
|
||||
__dirname,
|
||||
'./src/main/features/core/lyrics/furigana.ts',
|
||||
),
|
||||
'/@/remote': path.resolve(__dirname, './src/remote'),
|
||||
'/@/renderer': path.resolve(__dirname, './src/renderer'),
|
||||
'/@/shared': path.resolve(__dirname, './src/shared'),
|
||||
path: path.resolve(__dirname, './src/renderer/shims/path.ts'),
|
||||
},
|
||||
},
|
||||
root: path.resolve(__dirname, './src/renderer'),
|
||||
|
||||
Reference in New Issue
Block a user