build(tools): swap parcel for vite

This commit is contained in:
Marc 2024-02-16 00:05:49 -05:00
parent b7f6136625
commit 44828fa3de
Signed by: marc
GPG key ID: 048E042F22B5DC79
5 changed files with 3541 additions and 1089 deletions

View file

@ -2,11 +2,11 @@
directory = "netlify/functions/"
[dev]
command = "yarn start:parcel"
command = "yarn start:app"
publish = "dist"
targetPort = 8080
port = 1234
framework = "parcel"
framework = "vite"
[[redirects]]
from = "/*"

View file

@ -10,10 +10,9 @@
"types": "tsc --noEmit",
"clean": "rm -rf dist/*",
"start": "netlify dev",
"start:parcel": "parcel serve src/index.html --port 8080",
"build": "parcel build src/index.html",
"build:watch": "parcel watch src/index.html",
"build:bundlesize": "parcel build src/index.html --reporter @parcel/reporter-bundle-analyzer"
"start:app": "vite ./src --config ./vite.config.js --port 8080",
"build": "vite build ./src --config ./vite.config.js",
"build:watch": "vite build watch ./src --config ./vite.config.js"
},
"dependencies": {
"@emotion/react": "^11.11.3",
@ -27,14 +26,15 @@
},
"devDependencies": {
"@biomejs/biome": "^1.5.3",
"@parcel/reporter-bundle-analyzer": "^2.9.3",
"@parcel/validator-typescript": "^2.9.3",
"@types/react": "^18",
"@types/react-dom": "^18",
"esbuild": "^0.17.3",
"@vitejs/plugin-basic-ssl": "^1.1.0",
"@vitejs/plugin-legacy": "^5.3.0",
"jest": "29.3.1",
"netlify-cli": "^15.7.0",
"netlify-cli": "^17.16.2",
"parcel": "^2.9.3",
"typescript": "^4.9.4"
"terser": "^5.27.1",
"typescript": "^4.9.4",
"vite": "^5.1.3"
}
}

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>🏴‍☠️ Yet Another RSS Reader 🏴‍☠️</title>
<title>Yet Another RSS Reader</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>

33
vite.config.js Normal file
View file

@ -0,0 +1,33 @@
import legacy from "@vitejs/plugin-legacy"
import basicSSL from "@vitejs/plugin-basic-ssl"
import path from "node:path"
import { defineConfig } from "vite"
export default defineConfig({
plugins: [legacy(), basicSSL()],
build: {
outDir: "../dist",
rollupOptions: {
external: "./src",
},
},
server: {
port: 8080,
strictPort: true,
https: false,
},
test: {
environment: "jsdom",
//setupFiles: ["./src/tests/testSetup.ts"],
include: ["./src/**/*.test.ts", "./src/**/*.test.tsx"],
globals: true,
},
resolve: {
alias: [
{
find: "@",
replacement: path.resolve(__dirname, "./src"),
},
],
},
})

4573
yarn.lock

File diff suppressed because it is too large Load diff