build: replace webpack with vite (WIP)

This commit is contained in:
David Ralph
2022-04-13 15:25:50 +01:00
parent a699163b46
commit 8e0511667a
14 changed files with 138 additions and 230 deletions

View File

@@ -18,10 +18,10 @@
"@fontsource/lexend-deca": "4.4.5",
"@fontsource/montserrat": "4.4.5",
"@mui/material": "5.6.0",
"react": "18.0.0",
"react": "^18.0.0",
"react-clock": "3.1.0",
"react-color-gradient-picker": "0.1.2",
"react-dom": "18.0.0",
"react-dom": "^18.0.0",
"react-hot-keys": "2.7.1",
"react-icons": "^4.3.1",
"react-modal": "3.14.4",
@@ -29,34 +29,19 @@
"react-toastify": "8.2.0"
},
"devDependencies": {
"@babel/core": "^7.17.9",
"@babel/eslint-parser": "^7.17.0",
"@babel/plugin-transform-react-constant-elements": "^7.17.6",
"@babel/plugin-transform-react-inline-elements": "^7.16.7",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7",
"@eartharoid/deep-merge": "^0.0.2",
"babel-loader": "^8.2.4",
"copy-webpack-plugin": "9.1.0",
"css-loader": "^6.7.1",
"@vitejs/plugin-react": "^1.3.0",
"eslint": "^8.12.0",
"eslint-config-react-app": "^7.0.0",
"html-webpack-plugin": "^5.5.0",
"mini-css-extract-plugin": "^2.6.0",
"sass": "^1.50.0",
"sass-loader": "^12.6.0",
"source-map-loader": "^3.0.1",
"webpack": "^5.71.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.8.1"
"vite": "^2.9.1"
},
"scripts": {
"start": "webpack serve",
"start": "vite",
"updatetranslations": "cd scripts && node updatetranslations.js",
"build": "webpack --mode=production",
"chrome": "cp manifest/chrome.json build/manifest.json && cp -r manifest/_locales build/_locales && cp manifest/background-chrome.js build/background-chrome.js",
"firefox": "rm -rf build/_locales && cp manifest/firefox.json build/manifest.json"
"build": "vite build",
"chrome": "cp manifest/chrome.json dist/manifest.json && cp -r manifest/_locales dist/_locales && cp manifest/background-chrome.js dist/background-chrome.js",
"firefox": "rm -rf dist/_locales && cp manifest/firefox.json dist/manifest.json"
},
"browserslist": {
"production": [