build(tools): swap parcel for vite
This commit is contained in:
parent
b7f6136625
commit
44828fa3de
5 changed files with 3541 additions and 1089 deletions
|
@ -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 = "/*"
|
||||
|
|
18
package.json
18
package.json
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
33
vite.config.js
Normal 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"),
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
Loading…
Reference in a new issue