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 { svelte } from '@sveltejs/vite-plugin-svelte';
|
||||||
import webExtension from '@samrum/vite-plugin-web-extension';
|
import webExtension from '@samrum/vite-plugin-web-extension';
|
||||||
import path from 'path';
|
|
||||||
import { getManifest } from './src/manifest';
|
import { getManifest } from './src/manifest';
|
||||||
import { matches } from './src/lib/match';
|
import { matches } from './src/lib/match';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
@ -11,7 +11,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
plugins: [
|
plugins: [
|
||||||
svelte(),
|
svelte() as PluginOption,
|
||||||
webExtension({
|
webExtension({
|
||||||
manifest: getManifest(Number(env.MANIFEST_VERSION)),
|
manifest: getManifest(Number(env.MANIFEST_VERSION)),
|
||||||
additionalInputs: {
|
additionalInputs: {
|
||||||
@ -27,12 +27,10 @@ export default defineConfig(({ mode }) => {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
})
|
}) as unknown as PluginOption
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: [{ find: '~', replacement: fileURLToPath(new URL('./src', import.meta.url)) }]
|
||||||
'~': path.resolve(__dirname, './src')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user