mirror of
https://github.com/misenhower/splatoon3.ink.git
synced 2026-03-21 09:44:09 -05:00
- Replace JS config (tailwind.config.js) with CSS @theme block in base.css - Switch from PostCSS to @tailwindcss/vite plugin - Convert all bg-opacity-*/border-opacity-* to slash syntax (e.g. bg-zinc-900/70) - Add @custom-variant for mobile and ss variants - Add @reference to Vue scoped styles using @apply - Rename v3 utilities: rounded→rounded-sm, backdrop-blur-sm→backdrop-blur-xs, drop-shadow→drop-shadow-sm, rotate-[25deg]→rotate-25 - Delete obsolete tailwind.config.js and postcss.config.js - Rename vite.config.js to .mjs for ESM compatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1.1 KiB
JavaScript
50 lines
1.1 KiB
JavaScript
import { resolve } from 'path';
|
|
import { fileURLToPath, URL } from 'url';
|
|
|
|
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
|
|
|
const redirectToDist = [
|
|
'/assets/splatnet/',
|
|
'/data/',
|
|
];
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
tailwindcss(),
|
|
VueI18nPlugin({
|
|
include: resolve(__dirname, './src/assets/i18n/*.json'),
|
|
}),
|
|
{
|
|
// Quick hack to redirect dynamic assets to the /dist/ directory
|
|
configureServer(server) {
|
|
server.middlewares.use((req, res, next) => {
|
|
if (redirectToDist.some(s => req.url.startsWith(s))) {
|
|
req.url = '/dist' + req.url;
|
|
}
|
|
|
|
next();
|
|
});
|
|
},
|
|
},
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
build: {
|
|
emptyOutDir: false,
|
|
rollupOptions: {
|
|
input: {
|
|
main: resolve(__dirname, 'index.html'),
|
|
screenshots: resolve(__dirname, 'screenshots/index.html'),
|
|
},
|
|
},
|
|
},
|
|
});
|