build: Migrate to vite

Signed-off-by: Christian Wolf <github@christianwolf.email>
This commit is contained in:
Christian Wolf 2024-09-20 11:20:53 +02:00 committed by Kate
parent 42e05f2cf5
commit 8ebf80cfd0
6 changed files with 2487 additions and 3918 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
/node_modules/
/js/
/css/

6379
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,12 +7,13 @@
"npm": "^10.0.0"
},
"scripts": {
"build": "NODE_ENV=production webpack --config webpack.js --progress",
"dev": "NODE_ENV=development webpack --config webpack.js --progress",
"watch": "NODE_ENV=development webpack --config webpack.js --progress --watch",
"build": "vite build",
"dev": "vite --mode development build",
"watch": "vite --mode development build --watch",
"lint": "eslint src",
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css"
},
"type": "module",
"browserslist": [
"extends @nextcloud/browserslist-config"
],
@ -24,8 +25,7 @@
"@nextcloud/browserslist-config": "^3.0.1",
"@nextcloud/eslint-config": "^8.4.1",
"@nextcloud/stylelint-config": "^3.0.1",
"@nextcloud/webpack-vue-config": "^6.0.1",
"eslint-webpack-plugin": "^4.2.0",
"stylelint-webpack-plugin": "^5.0.1"
"@nextcloud/vite-config": "^1.4.2",
"vite": "^5.4.6"
}
}

13
vite.config.js Normal file
View File

@ -0,0 +1,13 @@
import { createAppConfig } from "@nextcloud/vite-config";
import { join, resolve } from "path";
export default createAppConfig(
{
main: resolve(join("src", "main.js")),
},
{
createEmptyCSSEntryPoints: true,
extractLicenseInformation: true,
thirdPartyLicense: false,
}
);