Skip to content

Commit

Permalink
Fix asset loading in webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
maxatdetroit committed Jul 16, 2024
1 parent fb4ddaa commit 36b85bf
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 4 deletions.
Binary file added build/d027d45141f87dc014af.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Demo Budget Form</title><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" crossorigin="anonymous"><link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap" rel="stylesheet"><script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/popper.js@1.9.4/dist/umd/popper.min.js" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" crossorigin="anonymous"></script><script defer="defer" src="bundle.js"></script></head><body><header><img src="assets/city-of-detroit-logo.png" alt="Logo" id="logo"><h1>FY2026 Budget Form</h1><h2 id="subtitle"></h2></header><div id="main-panel"><div id="welcome-page"><button class="btn step" id="step-upload">1. Upload your Excel data</button> <button class="btn step" id="step-revenue">2. Baseline request</button> <button class="btn step" id="step-initiatives">3. Name any new initiatives</button> <button class="btn step" id="step-finish">4. Confirm and finish</button></div><div id="prompt-div"><h3 id="prompt"></h3><br><button class="btn" id="option1"></button> <button class="btn" id="option2"></button></div><div class="table-container"><table class="table table-bordered mt-3" id="main-table"><thead class="thead-dark"></thead><tbody></tbody></table></div><div class="row"><div id="add-btn-div"><button class="btn btn-add" id="add-btn"></button></div></div><div class="row"><div class="col-md-12"><div id="nav-btns"><button class="btn" id="btn-last"><strong>&lt;&lt; Previous</strong></button> <button class="btn" id="btn-next"><strong>Continue &gt;&gt;</strong></button></div></div></div></div><div id="sidebar-panel"><div class="sidebar-content"><br><h4 id="sidebar-title">Summary</h4><br><h6 id="section-header"><strong>Baseline</strong></h6><div id="baseline-stats"><div class="sidebar-stat-line" id="target"><span class="stat-label">FY26 target:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="baseline-revenue"><span class="stat-label">Projected revenue:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="baseline-personnel"><span class="stat-label">Personnel cost:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="baseline-nonpersonnel"><span class="stat-label">Non-personnel cost:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="baseline-total"><span class="stat-label">Total baseline:</span> <span class="stat"></span></div></div><br><h6 id="section-header"><strong>Supplemental</strong></h6><div id="supp-stats"><div class="sidebar-stat-line" id="supp-revenue"><span class="stat-label">Revenue:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="supp-personnel"><span class="stat-label">Personnel cost:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="supp-nonpersonnel"><span class="stat-label">Non-personnel cost:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="supp-total"><span class="stat-label">Total supplemental:</span> <span class="stat"></span></div></div></div></div><div class="modal fade" id="main-modal" tabindex="-1"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="modal-title"></h5><button type="button" id="modal-close-x" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body" id="modal-body"></div></div></div></div></body></html>
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Demo Budget Form</title><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" crossorigin="anonymous"><link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap" rel="stylesheet"><script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/popper.js@1.9.4/dist/umd/popper.min.js" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" crossorigin="anonymous"></script><script defer="defer" src="bundle.js"></script></head><body><header><img src="d027d45141f87dc014af.png" alt="City of Detroit Logo" id="logo"><h1>FY2026 Budget Form</h1><h2 id="subtitle"></h2></header><div id="main-panel"><div id="welcome-page"><button class="btn step" id="step-upload">1. Upload your Excel data</button> <button class="btn step" id="step-revenue">2. Baseline request</button> <button class="btn step" id="step-initiatives">3. Name any new initiatives</button> <button class="btn step" id="step-finish">4. Confirm and finish</button></div><div id="prompt-div"><h3 id="prompt"></h3><br><button class="btn" id="option1"></button> <button class="btn" id="option2"></button></div><div class="table-container"><table class="table table-bordered mt-3" id="main-table"><thead class="thead-dark"></thead><tbody></tbody></table></div><div class="row"><div id="add-btn-div"><button class="btn btn-add" id="add-btn"></button></div></div><div class="row"><div class="col-md-12"><div id="nav-btns"><button class="btn" id="btn-last"><strong>&lt;&lt; Previous</strong></button> <button class="btn" id="btn-next"><strong>Continue &gt;&gt;</strong></button></div></div></div></div><div id="sidebar-panel"><div class="sidebar-content"><br><h4 id="sidebar-title">Summary</h4><br><h6 id="section-header"><strong>Baseline</strong></h6><div id="baseline-stats"><div class="sidebar-stat-line" id="target"><span class="stat-label">FY26 target:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="baseline-revenue"><span class="stat-label">Projected revenue:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="baseline-personnel"><span class="stat-label">Personnel cost:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="baseline-nonpersonnel"><span class="stat-label">Non-personnel cost:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="baseline-total"><span class="stat-label">Total baseline:</span> <span class="stat"></span></div></div><br><h6 id="section-header"><strong>Supplemental</strong></h6><div id="supp-stats"><div class="sidebar-stat-line" id="supp-revenue"><span class="stat-label">Revenue:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="supp-personnel"><span class="stat-label">Personnel cost:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="supp-nonpersonnel"><span class="stat-label">Non-personnel cost:</span> <span class="stat"></span></div><div class="sidebar-stat-line" id="supp-total"><span class="stat-label">Total supplemental:</span> <span class="stat"></span></div></div></div></div><div class="modal fade" id="main-modal" tabindex="-1"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="modal-title"></h5><button type="button" id="modal-close-x" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body" id="modal-body"></div></div></div></div></body></html>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@babel/preset-env": "^7.24.8",
"babel-loader": "^9.1.3",
"css-loader": "^7.1.2",
"html-loader": "^5.0.0",
"html-webpack-plugin": "^5.6.0",
"mini-css-extract-plugin": "^2.9.0",
"optimize-css-assets-webpack-plugin": "^6.0.1",
Expand Down
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ module.exports = {
'css-loader'
], // Use style-loader in development for hot reloading
},
{
test: /\.html$/, // Process any .html files
use: ['html-loader'],
},
{
test: /\.(png|svg|jpg|jpeg|gif)$/i,
type: 'asset/resource',
},
],
},

Expand Down
39 changes: 36 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ chrome-trace-event@^1.0.2:
resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b"
integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==

clean-css@^5.2.2:
clean-css@^5.2.2, clean-css@~5.3.2:
version "5.3.3"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.3.tgz#b330653cd3bd6b75009cc25c714cae7b93351ccd"
integrity sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==
Expand Down Expand Up @@ -1702,7 +1702,7 @@ colorette@^2.0.10, colorette@^2.0.14:
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a"
integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==

commander@^10.0.1:
commander@^10.0.0, commander@^10.0.1:
version "10.0.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06"
integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==
Expand Down Expand Up @@ -2067,6 +2067,11 @@ entities@^2.0.0:
resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55"
integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==

entities@^4.4.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48"
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==

envinfo@^7.7.3:
version "7.13.0"
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31"
Expand Down Expand Up @@ -2431,6 +2436,14 @@ html-entities@^2.4.0:
resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f"
integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==

html-loader@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-5.0.0.tgz#2bb3ed423e9ea10f24add5d1a563adc5a8fc7f00"
integrity sha512-puaGKdjdVVIFRtgIC2n5dt5bt0N5j6heXlAQZ4Do1MLjHmOT1gCE1Ogg7XZNeJlnOVHHsrZKGs5dfh+XwZ3XPw==
dependencies:
html-minifier-terser "^7.2.0"
parse5 "^7.1.2"

html-minifier-terser@^6.0.2:
version "6.1.0"
resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#bfc818934cc07918f6b3669f5774ecdfd48f32ab"
Expand All @@ -2444,6 +2457,19 @@ html-minifier-terser@^6.0.2:
relateurl "^0.2.7"
terser "^5.10.0"

html-minifier-terser@^7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz#18752e23a2f0ed4b0f550f217bb41693e975b942"
integrity sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==
dependencies:
camel-case "^4.1.2"
clean-css "~5.3.2"
commander "^10.0.0"
entities "^4.4.0"
param-case "^3.0.4"
relateurl "^0.2.7"
terser "^5.15.1"

html-webpack-plugin@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.6.0.tgz#50a8fa6709245608cb00e811eacecb8e0d7b7ea0"
Expand Down Expand Up @@ -3078,6 +3104,13 @@ param-case@^3.0.4:
dot-case "^3.0.4"
tslib "^2.0.3"

parse5@^7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32"
integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==
dependencies:
entities "^4.4.0"

parseurl@~1.3.2, parseurl@~1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
Expand Down Expand Up @@ -3949,7 +3982,7 @@ terser-webpack-plugin@^5.3.10:
serialize-javascript "^6.0.1"
terser "^5.26.0"

terser@^5.10.0, terser@^5.26.0:
terser@^5.10.0, terser@^5.15.1, terser@^5.26.0:
version "5.31.3"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.3.tgz#b24b7beb46062f4653f049eea4f0cd165d0f0c38"
integrity sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA==
Expand Down

0 comments on commit 36b85bf

Please sign in to comment.