mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 21:26:40 +00:00
* Add explicit extensions to relative imports * Add linting rule * Fix outdated pnpm lock * fix: use esbuild --------- Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com> Co-authored-by: Calum H. (IMB11) <contact@cal.engineer> Co-authored-by: Calum H. <calum@modrinth.com>
50 lines
858 B
TypeScript
50 lines
858 B
TypeScript
import path from 'node:path'
|
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { defineConfig } from 'vite'
|
|
import svgLoader from 'vite-svg-loader'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
svgLoader({
|
|
svgoConfig: {
|
|
plugins: [
|
|
{
|
|
name: 'preset-default',
|
|
params: {
|
|
overrides: {
|
|
removeViewBox: false,
|
|
cleanupIds: {
|
|
minify: false,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
cacheDir: '.vite',
|
|
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
'#ui': path.resolve(__dirname, 'src'),
|
|
'@modrinth/api-client': path.resolve(__dirname, '../api-client/src/index.ts'),
|
|
},
|
|
},
|
|
|
|
build: {
|
|
lib: {
|
|
entry: path.resolve(__dirname, 'index.ts'),
|
|
name: 'ModrinthUI',
|
|
formats: ['es'],
|
|
fileName: 'index',
|
|
},
|
|
rollupOptions: {
|
|
external: ['vue'],
|
|
},
|
|
},
|
|
})
|