mirror of
https://github.com/movie-web/movie-web.git
synced 2025-01-26 18:55:29 +01:00
use spaces as indents, damn you vsc settings
This commit is contained in:
parent
855ed60e37
commit
e86a9c2698
188
vite.config.ts
188
vite.config.ts
@ -5,101 +5,101 @@ import { VitePWA } from "vite-plugin-pwa";
|
|||||||
import checker from "vite-plugin-checker";
|
import checker from "vite-plugin-checker";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { handlebars } from "./plugins/handlebars";
|
import { handlebars } from "./plugins/handlebars";
|
||||||
import { loadEnv } from "vite"
|
import { loadEnv } from "vite";
|
||||||
|
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
const env = loadEnv(mode, process.cwd())
|
const env = loadEnv(mode, process.cwd());
|
||||||
return {
|
return {
|
||||||
plugins:[
|
plugins: [
|
||||||
handlebars({
|
handlebars({
|
||||||
vars: {
|
vars: {
|
||||||
opensearch: env.VITE_OPENSEARCH_ENABLED ? '<link rel="search" type="application/opensearchdescription+xml" title="movie-web" href="src/assets/opensearch.xml">' : "",
|
opensearch: env.VITE_OPENSEARCH_ENABLED ? '<link rel="search" type="application/opensearchdescription+xml" title="movie-web" href="src/assets/opensearch.xml">' : "",
|
||||||
appdomain: env.VITE_APP_DOMAIN,
|
appdomain: env.VITE_APP_DOMAIN,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
react({
|
react({
|
||||||
babel: {
|
babel: {
|
||||||
presets: [
|
presets: [
|
||||||
"@babel/preset-typescript",
|
"@babel/preset-typescript",
|
||||||
[
|
[
|
||||||
"@babel/preset-env",
|
"@babel/preset-env",
|
||||||
{
|
{
|
||||||
modules: false,
|
modules: false,
|
||||||
useBuiltIns: "entry",
|
useBuiltIns: "entry",
|
||||||
corejs: {
|
corejs: {
|
||||||
version: "3.29",
|
version: "3.29",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
VitePWA({
|
VitePWA({
|
||||||
registerType: "autoUpdate",
|
registerType: "autoUpdate",
|
||||||
workbox: {
|
workbox: {
|
||||||
globIgnores: ["**ping.txt**"],
|
globIgnores: ["**ping.txt**"],
|
||||||
},
|
},
|
||||||
includeAssets: [
|
includeAssets: [
|
||||||
"favicon.ico",
|
"favicon.ico",
|
||||||
"apple-touch-icon.png",
|
"apple-touch-icon.png",
|
||||||
"safari-pinned-tab.svg",
|
"safari-pinned-tab.svg",
|
||||||
],
|
],
|
||||||
manifest: {
|
manifest: {
|
||||||
name: "movie-web",
|
name: "movie-web",
|
||||||
short_name: "movie-web",
|
short_name: "movie-web",
|
||||||
description: "The place for your favourite movies & shows",
|
description: "The place for your favourite movies & shows",
|
||||||
theme_color: "#120f1d",
|
theme_color: "#120f1d",
|
||||||
background_color: "#120f1d",
|
background_color: "#120f1d",
|
||||||
display: "standalone",
|
display: "standalone",
|
||||||
start_url: "/",
|
start_url: "/",
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: "android-chrome-192x192.png",
|
src: "android-chrome-192x192.png",
|
||||||
sizes: "192x192",
|
sizes: "192x192",
|
||||||
type: "image/png",
|
type: "image/png",
|
||||||
purpose: "any",
|
purpose: "any",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: "android-chrome-512x512.png",
|
src: "android-chrome-512x512.png",
|
||||||
sizes: "512x512",
|
sizes: "512x512",
|
||||||
type: "image/png",
|
type: "image/png",
|
||||||
purpose: "any",
|
purpose: "any",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: "android-chrome-192x192.png",
|
src: "android-chrome-192x192.png",
|
||||||
sizes: "192x192",
|
sizes: "192x192",
|
||||||
type: "image/png",
|
type: "image/png",
|
||||||
purpose: "maskable",
|
purpose: "maskable",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: "android-chrome-512x512.png",
|
src: "android-chrome-512x512.png",
|
||||||
sizes: "512x512",
|
sizes: "512x512",
|
||||||
type: "image/png",
|
type: "image/png",
|
||||||
purpose: "maskable",
|
purpose: "maskable",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
loadVersion(),
|
loadVersion(),
|
||||||
checker({
|
checker({
|
||||||
typescript: true, // check typescript build errors in dev server
|
typescript: true, // check typescript build errors in dev server
|
||||||
eslint: {
|
eslint: {
|
||||||
// check lint errors in dev server
|
// check lint errors in dev server
|
||||||
lintCommand: "eslint --ext .tsx,.ts src",
|
lintCommand: "eslint --ext .tsx,.ts src",
|
||||||
dev: {
|
dev: {
|
||||||
logLevel: ["error"],
|
logLevel: ["error"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"@": path.resolve(__dirname, "./src"),
|
"@": path.resolve(__dirname, "./src"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
test: {
|
test: {
|
||||||
environment: "jsdom",
|
environment: "jsdom",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user