Skip to content

Commit

Permalink
chore(vite): Migrate from webpack to vite
Browse files Browse the repository at this point in the history
  • Loading branch information
raimund-schluessler committed Dec 14, 2023
1 parent 5b974be commit 8b644bc
Show file tree
Hide file tree
Showing 8 changed files with 3,110 additions and 4,870 deletions.
File renamed without changes.
File renamed without changes.
7,950 changes: 3,100 additions & 4,850 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"private": true,
"homepage": "https://github.com/raimund-schluessler/inventory",
"scripts": {
"build": "webpack --node-env production --progress",
"dev": "webpack --node-env development --progress",
"watch": "webpack --node-env development --progress --watch",
"build": "vite build --mode production",
"dev": "vite build --mode development",
"watch": "vite build --mode development --watch",
"lint": "eslint --ext .js,.vue src tests",
"lint:fix": "eslint --ext .js,.vue src tests --fix",
"test": "jest --verbose"
Expand All @@ -21,6 +21,7 @@
"type": "git",
"url": "git@github.com:raimund-schluessler/inventory.git"
},
"type": "module",
"bugs": "https://github.com/raimund-schluessler/inventory/issues",
"contributors": [],
"dependencies": {
Expand All @@ -32,6 +33,7 @@
"@nextcloud/l10n": "2.2.0",
"@nextcloud/moment": "1.2.2",
"@nextcloud/router": "2.2.0",
"@nextcloud/vite-config": "^1.1.0",
"@nextcloud/vue": "8.3.0",
"@vueuse/components": "^10.7.0",
"bwip-js": "4.1.2",
Expand All @@ -53,7 +55,6 @@
"@nextcloud/browserslist-config": "3.0.0",
"@nextcloud/eslint-config": "^8.3.0",
"@nextcloud/stylelint-config": "2.3.1",
"@nextcloud/webpack-vue-config": "github:nextcloud/webpack-vue-config#master",
"@vue/test-utils": "^1.3.0",
"@vue/vue2-jest": "^29.2.6",
"babel-core": "7.0.0-bridge.0",
Expand Down
13 changes: 0 additions & 13 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,9 @@ import App from './App.vue'
import router from './router.js'
import store from './store/store.js'

import { linkTo } from '@nextcloud/router'

import Vue from 'vue'
import { sync } from 'vuex-router-sync'

// CSP config for webpack dynamic chunk loading
// eslint-disable-next-line
__webpack_nonce__ = btoa(OC.requestToken)

// Correct the root of the app for chunk loading
// OC.linkTo matches the apps folders
// OC.generateUrl ensure the index.php (or not)
// We do not want the index.php since we're loading files
// eslint-disable-next-line
__webpack_public_path__ = linkTo('inventory', 'js/')

sync(store, router)

if (!OCA.Inventory) {
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions vite.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { createAppConfig } from '@nextcloud/vite-config'

export default createAppConfig({
main: 'src/main.js',
})
3 changes: 0 additions & 3 deletions webpack.config.js

This file was deleted.

0 comments on commit 8b644bc

Please sign in to comment.