mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-05-09 20:25:14 +02:00
Update vite config
This commit is contained in:
parent
6aaf960c28
commit
3ac73ac3b4
@ -1,9 +1,9 @@
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
import { defineConfig, loadEnv, type PluginOption } from 'vite';
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
||||
import webExtension from '@samrum/vite-plugin-web-extension';
|
||||
import path from 'path';
|
||||
import { getManifest } from './src/manifest';
|
||||
import { matches } from './src/lib/match';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({ mode }) => {
|
||||
@ -11,7 +11,7 @@ export default defineConfig(({ mode }) => {
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
svelte(),
|
||||
svelte() as PluginOption,
|
||||
webExtension({
|
||||
manifest: getManifest(Number(env.MANIFEST_VERSION)),
|
||||
additionalInputs: {
|
||||
@ -27,12 +27,10 @@ export default defineConfig(({ mode }) => {
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
}) as unknown as PluginOption
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'~': path.resolve(__dirname, './src')
|
||||
}
|
||||
alias: [{ find: '~', replacement: fileURLToPath(new URL('./src', import.meta.url)) }]
|
||||
}
|
||||
};
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user