Skip to content

Commit

Permalink
Merge pull request #24 from DSACMS/gaelan/fixes-20230710
Browse files Browse the repository at this point in the history
Couple JS/CSS fixes
  • Loading branch information
Gaelan authored Jul 11, 2023
2 parents 9254881 + 5938141 commit b3d67df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
...(process.env.NODE_ENV === "production"
? [
require("@fullhuman/postcss-purgecss")({
content: ["./.11ty-vite/**/*.html"],
content: ["./.11ty-vite/**/*.html", "./.11ty-vite/**/*.js"],
safelist: ["usa-js-loading"],
extractors: [
{
Expand Down
7 changes: 7 additions & 0 deletions src/js/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import "@uswds/uswds/css/uswds.min.css"
import { accordion, banner, navigation } from "@uswds/uswds/js"

// This is part of the "uswds-init" machinery to handle failure to load JS
// gracefully. Normally uswds-core/src/js/start.js would do this for us, but
// this file only gets included in bundles - there's no way to individually
// include it.
window.uswdsPresent = true

accordion.on()
banner.on()
navigation.on()

0 comments on commit b3d67df

Please sign in to comment.