chore: init oxc

This commit is contained in:
Julien Calixte
2026-03-28 09:34:04 +01:00
parent d457fd4064
commit 8e8706e258
19 changed files with 830 additions and 192 deletions

View File

@@ -1,87 +1,87 @@
import vue from "@vitejs/plugin-vue"
import path from "path"
import { defineConfig, type UserConfigExport } from "vite"
import { VitePWA } from "vite-plugin-pwa"
import vue from '@vitejs/plugin-vue'
import path from 'path'
import { defineConfig, type UserConfigExport } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig(({ command }) => {
const config: UserConfigExport = {
build: {
minify: "esbuild",
minify: 'esbuild'
},
plugins: [
vue(),
VitePWA({
registerType: "prompt",
registerType: 'prompt',
includeAssets: [
"favicon.ico",
"apple-touch-icon.png",
"apple-touch-icon-180x180.png",
"favicon.png",
"pwa-64x64.png",
"pwa-192x192.png",
"pwa-512x512.png",
"masked-icon.png",
"maskable-icon-512x512.png",
"monochrome-icon.png",
"assets/*.svg",
'favicon.ico',
'apple-touch-icon.png',
'apple-touch-icon-180x180.png',
'favicon.png',
'pwa-64x64.png',
'pwa-192x192.png',
'pwa-512x512.png',
'masked-icon.png',
'maskable-icon-512x512.png',
'monochrome-icon.png',
'assets/*.svg'
],
manifest: {
name: "Remanso",
short_name: "Remanso",
description: "Note taking & sharing app",
background_color: "#ffa4c0",
theme_color: "#ffa4c0",
name: 'Remanso',
short_name: 'Remanso',
description: 'Note taking & sharing app',
background_color: '#ffa4c0',
theme_color: '#ffa4c0',
icons: [
{
src: "pwa-64x64.png",
sizes: "64x64",
type: "image/png",
src: 'pwa-64x64.png',
sizes: '64x64',
type: 'image/png'
},
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
src: 'pwa-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png'
},
{
src: "favicon.png",
sizes: "1024x1024",
type: "image/png",
src: 'favicon.png',
sizes: '1024x1024',
type: 'image/png'
},
{
src: "maskable-icon-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
src: 'maskable-icon-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable'
},
{
src: "monochrome-icon.png",
sizes: "1024x1024",
type: "image/png",
purpose: "monochrome",
},
],
},
}),
src: 'monochrome-icon.png',
sizes: '1024x1024',
type: 'image/png',
purpose: 'monochrome'
}
]
}
})
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"node-fetch": "isomorphic-fetch",
},
},
'@': path.resolve(__dirname, './src'),
'node-fetch': 'isomorphic-fetch'
}
}
}
if (command === "serve") {
if (command === 'serve') {
config.define = {
global: {},
global: {}
}
config.server = {
host: "127.0.0.1",
host: '127.0.0.1'
}
}