Bundle js modules with vite

This commit is contained in:
Akira Tempaku 2024-02-22 02:20:00 +09:00
commit d8db79e00c
12 changed files with 943 additions and 44 deletions

View file

@ -19,8 +19,8 @@
(defparameter *app*
(lack:builder (:static
:path "/static/"
:root (asdf:system-relative-pathname :hp "static/"))
:path "/dist/assets/"
:root (asdf:system-relative-pathname :hp "assets/"))
*raw-app*))
; for clackup cmd

View file

@ -9,10 +9,8 @@
(html
(head
(title "skyizwhite.dev")
(script :src "/static/vendor/htmx.min.js")
(script :defer t :src "/static/vendor/alpine.min.js")
(link :href "/static/style/main.css" :rel "stylesheet")
(link :href "/static/style/tailwind.css" :rel "stylesheet"))
(script :type "module" :src "http://localhost:5173/@vite/client")
(script :type "module" :src "http://localhost:5173/src/js/main.js"))
(body :class "h-[100svh] w-screen"
(main :class "h-full"
pi:children)))))

8
src/js/main.js Normal file
View file

@ -0,0 +1,8 @@
import './style.css'
import HTMX from 'htmx.org'
import Alpine from 'alpinejs'
window.htmx = HTMX;
window.Alpine = Alpine
Alpine.start()

3
src/js/style.css Normal file
View file

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;