mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-03-31 11:38:49 +00:00
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { resolve } from 'node:path'
|
|
|
|
import { sveltekit } from '@sveltejs/kit/vite'
|
|
import license from 'rollup-plugin-license'
|
|
import { defineConfig } from 'vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
sveltekit(),
|
|
license({
|
|
thirdParty: {
|
|
allow: '(MIT OR Apache-2.0 OR ISC OR BSD-3-Clause OR BSD-2-Clause)',
|
|
output: resolve(__dirname, './build/LICENSE.txt'),
|
|
includeSelf: true
|
|
}
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
// thank you bottleneck for importing useless modules
|
|
'./RedisConnection': resolve(__dirname, 'src/patches/empty.cjs'),
|
|
'./RedisConnection.js': resolve(__dirname, 'src/patches/empty.cjs'),
|
|
'./RedisDatastore': resolve(__dirname, 'src/patches/empty.cjs'),
|
|
'./IORedisConnection': resolve(__dirname, 'src/patches/empty.cjs'),
|
|
'./Scripts': resolve(__dirname, 'src/patches/empty.cjs'),
|
|
// no exports :/
|
|
'bittorrent-tracker/lib/client/websocket-tracker.js': resolve(__dirname, 'node_modules/bittorrent-tracker/lib/client/websocket-tracker.js'),
|
|
}
|
|
},
|
|
server: { port: 7344 },
|
|
build: {
|
|
target: 'esnext',
|
|
sourcemap: true
|
|
},
|
|
ssr: {
|
|
target: 'webworker'
|
|
},
|
|
optimizeDeps: {
|
|
exclude: ['anitomyscript']
|
|
}
|
|
})
|