move from webpack to vite

This commit is contained in:
MarcZierle 2022-06-17 10:45:51 +02:00
parent dc9f774c06
commit 7b35fe6583
13 changed files with 1306 additions and 27065 deletions

View File

@ -1,8 +1,6 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
"es2021": true,
},
"extends": [
"eslint:recommended",
@ -12,12 +10,6 @@
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 2018,
"sourceType": "module",
"allowImportExportEverywhere": true
},
"plugins": [
"vue"
],

View File

@ -1,5 +0,0 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
}

View File

@ -4,12 +4,14 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="favicon.png">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="icon" href="/favicon.png">
<title>Zierle-Training Online Tools</title>
<script type="module" src="/src/main.js"></script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
<strong>We're sorry but the Online Tools don't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->

28292
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,16 @@
{
"name": "zierle-training-online-tools",
"version": "0.1.0",
"version": "0.2.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src"
},
"dependencies": {
"autoprefixer": "^9.8.8",
"axios": "^0.24.0",
"babel-eslint": "^10.1.0",
"core-js": "^3.6.5",
"postcss": "^7.0.39",
"tailwind-children": "^0.5.0",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
@ -34,21 +33,16 @@
"@vicons/material": "^0.11.0",
"@vicons/tabler": "^0.11.0",
"@vicons/utils": "^0.1.4",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"@vitejs/plugin-vue": "^2.3.3",
"@vue/eslint-config-prettier": "^6.0.0",
"eslint": "^6.8.0",
"eslint": "^8.17.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^8.2.0",
"eslint-plugin-vue": "^8.7.1",
"naive-ui": "^2.23.2",
"prettier": "^2.2.1",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vfonts": "^0.1.0",
"vite": "^2.9.12",
"vue-cli-plugin-tailwind": "~3.0.0"
}
}

View File

@ -20,7 +20,7 @@ import { defineComponent } from 'vue'
import { useMeta } from 'vue-meta'
import {darkTheme} from 'naive-ui'
import NavBar from '@/components/NavBar'
import NavBar from '@/components/NavBar.vue'
export default defineComponent({
components: {

View File

@ -57,7 +57,7 @@
<script>
import { useMessage } from 'naive-ui'
import PhotoItem from '@/components/PhotoItem'
import PhotoItem from '@/components/PhotoItem.vue'
export default {
name: 'PhotoSelectModal',

View File

@ -38,7 +38,7 @@ export function setI18nLanguage(i18n, locale) {
export async function loadLocaleMessages(i18n, locale) {
// load locale messages with dynamic import
const messages = await import(
/* webpackChunkName: "locale-[request]" */ `./locales/${locale}.json`
`./locales/${locale}.json`
)
// set locale and locale message

View File

@ -228,7 +228,7 @@ import LibraryAddRound from '@vicons/material/LibraryAddRound'
import AddPhotoAlternateOutlined from '@vicons/material/AddPhotoAlternateOutlined'
import SaveFilled from '@vicons/material/SaveFilled'
import PhotoSelectModal from '@/components/PhotoSelectModal'
import PhotoSelectModal from '@/components/PhotoSelectModal.vue'
import { getPhotoLogPDF } from '@/api'

View File

@ -223,7 +223,7 @@ import AddPhotoAlternateOutlined from '@vicons/material/AddPhotoAlternateOutline
import SaveFilled from '@vicons/material/SaveFilled'
import MdPricetag from '@vicons/ionicons4/MdPricetag'
import PhotoSelectModal from '@/components/PhotoSelectModal'
import PhotoSelectModal from '@/components/PhotoSelectModal.vue'
export default {
name: 'CreateLog',

View File

@ -14,7 +14,7 @@
import { useMeta } from 'vue-meta'
import { useMessage } from 'naive-ui'
import PhotoCropper from '@/components/PhotoCropper'
import PhotoCropper from '@/components/PhotoCropper.vue'
export default {
name: 'DevView',

View File

@ -158,8 +158,8 @@
import { useMeta } from 'vue-meta'
import { useMessage } from 'naive-ui'
import PhotoItem from '@/components/PhotoItem'
import PhotoCropper from '@/components/PhotoCropper'
import PhotoItem from '@/components/PhotoItem.vue'
import PhotoCropper from '@/components/PhotoCropper.vue'
export default {
components: {

16
vite.config.js Normal file
View File

@ -0,0 +1,16 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const path = require("path");
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
host: true,
port: 8080,
},
})