From b4b4467661776ffc39c6bf953afd55ec4fe39d6f Mon Sep 17 00:00:00 2001 From: Frieder Schlesier Date: Mon, 13 Feb 2023 19:05:56 +0100 Subject: [PATCH] add pug template plugin --- package.json | 1 + src/App.vue | 2 ++ src/components/EventList.vue | 22 ++++++++++++++++++++++ vite.config.ts | 10 ++++++++-- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/components/EventList.vue diff --git a/package.json b/package.json index 5e6c9a6..6c634a7 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "prisma": "^4.9.0", "typescript": "^4.9.3", "vite": "^4.0.0", + "vite-plugin-pug": "^0.3.2", "vue-tsc": "^1.0.11" } } diff --git a/src/App.vue b/src/App.vue index 6d8ccdf..851af32 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,7 @@ diff --git a/vite.config.ts b/vite.config.ts index 05c1740..db9ae6b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,13 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import pugPlugin from "vite-plugin-pug" + +const options = {} +const locals = { name: "My Pug" } // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], -}) + plugins: [ + vue(), + pugPlugin(options, locals)], +}) \ No newline at end of file