From 716fe5508208102fc7a0cf04f742f787ff9c42d3 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 24 Jul 2024 20:01:27 -0400 Subject: [PATCH] membershipworks: Fix missing bootstrap CSS in invoice PDFs --- js/base.entry.ts | 2 +- .../templates/membershipworks/event_invoice_pdf.dj.html | 4 ++-- vite.config.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/base.entry.ts b/js/base.entry.ts index f3e936f..a88f5a2 100644 --- a/js/base.entry.ts +++ b/js/base.entry.ts @@ -1,3 +1,3 @@ -import "bootstrap/scss/bootstrap.scss"; +import "./bootstrap-css-only.entry.ts"; import "bootstrap-icons/font/bootstrap-icons.css"; import "bootstrap"; diff --git a/membershipworks/templates/membershipworks/event_invoice_pdf.dj.html b/membershipworks/templates/membershipworks/event_invoice_pdf.dj.html index eff5781..8204a29 100644 --- a/membershipworks/templates/membershipworks/event_invoice_pdf.dj.html +++ b/membershipworks/templates/membershipworks/event_invoice_pdf.dj.html @@ -1,13 +1,13 @@ {% load static %} {% load nh3_tags %} +{% load django_vite %} - - + {% vite_asset 'js/bootstrap-css-only.entry.ts' %} {% if preview %} diff --git a/vite.config.js b/vite.config.js index 1f4511d..6ccf7d9 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,6 +6,7 @@ const entry_points = globbySync("*/js/*.entry.ts", { gitignore: true }); const inputs = { base: "./js/base.entry.ts", + "bootstrap-css-only": "./js/bootstrap-css-only.entry.ts", }; for (const entry of entry_points) {