diff --git a/package-lock.json b/package-lock.json
index 42e9cacf0..3c4bf4ae3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -81,7 +81,6 @@
"@storybook/addon-essentials": "^7.6.7",
"@storybook/addon-interactions": "^7.6.7",
"@storybook/addon-links": "^7.6.7",
- "@storybook/addon-onboarding": "^1.0.10",
"@storybook/blocks": "^7.6.7",
"@storybook/react": "^7.6.7",
"@storybook/react-webpack5": "^7.6.7",
@@ -4794,20 +4793,6 @@
"url": "https://opencollective.com/storybook"
}
},
- "node_modules/@storybook/addon-onboarding": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/@storybook/addon-onboarding/-/addon-onboarding-1.0.10.tgz",
- "integrity": "sha512-tK7JjJYIpOM4LowBoIM/8ymYQ70qVRmu7pGqSOQ82AW15ob5u36HJ753y0hVH/KPj6k7J1aSgAEgVGXLmgwvKw==",
- "dev": true,
- "dependencies": {
- "@storybook/telemetry": "^7.1.0",
- "react-confetti": "^6.1.0"
- },
- "peerDependencies": {
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
- }
- },
"node_modules/@storybook/addon-outline": {
"version": "7.6.7",
"resolved": "https://registry.npmjs.org/@storybook/addon-outline/-/addon-outline-7.6.7.tgz",
@@ -21504,21 +21489,6 @@
"react-dom": ">=16.8.0"
}
},
- "node_modules/react-confetti": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/react-confetti/-/react-confetti-6.1.0.tgz",
- "integrity": "sha512-7Ypx4vz0+g8ECVxr88W9zhcQpbeujJAVqL14ZnXJ3I23mOI9/oBVTQ3dkJhUmB0D6XOtCZEM6N0Gm9PMngkORw==",
- "dev": true,
- "dependencies": {
- "tween-functions": "^1.2.0"
- },
- "engines": {
- "node": ">=10.18"
- },
- "peerDependencies": {
- "react": "^16.3.0 || ^17.0.1 || ^18.0.0"
- }
- },
"node_modules/react-copy-to-clipboard": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz",
@@ -24883,12 +24853,6 @@
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
},
- "node_modules/tween-functions": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/tween-functions/-/tween-functions-1.2.0.tgz",
- "integrity": "sha512-PZBtLYcCLtEcjL14Fzb1gSxPBeL7nWvGhO5ZFPGqziCcr8uvHp0NDmdjBchp6KHL+tExcg0m3NISmKxhU394dA==",
- "dev": true
- },
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
diff --git a/package.json b/package.json
index cb437350b..50c7d0ab7 100644
--- a/package.json
+++ b/package.json
@@ -15,14 +15,14 @@
"wdio:setup": "node tests/browserstack_automation/buildMobileCapabilities.js",
"wdio": "wdio ./tests/browserstack_automation/config/wdio.config.js",
"wdio:upgrade": "ncu -u *wdio* webdriver*",
- "build": "node node/buildDateFile.js && MINIMIZED=1 webpack --mode production",
+ "build": "node node/buildDateFile.js && npm run build-storybook && MINIMIZED=1 webpack --mode production",
"buildCordova": "node node/buildDateFile.js && node node/buildSrcCordova && CORDOVA=1 && webpack --mode development && node node/logCompileDate.js",
"buildCordovaAndLinks": "node node/buildDateFile.js && node node/buildSrcCordova && CORDOVA=1 && webpack --mode development && node node/buildSymLinksRemote.js && bash ./node/unSymLinkIOS.sh && node node/logCompileDate.js",
"lint": "eslint --format stylish --ext .jsx --ext .js src/js",
"lintCordova": "eslint --format stylish --ext .jsx --ext .js srcCordova/js",
- "prod": "node node/buildDateFile.js && MINIMIZED=1 webpack --mode production",
+ "prod": "npm run build",
"run-prod-local": "node server-prod-local.js",
- "start": "node node/buildDateFile.js && PROTOCOL=HTTP webpack serve --mode development",
+ "start": "node node/buildDateFile.js && npm run build-storybook && PROTOCOL=HTTP webpack serve --mode development",
"start-win": "node node/buildDateFile.js && webpack serve --mode development",
"start-https": "node node/buildDateFile.js && PROTOCOL=HTTPS webpack serve --mode development",
"start-https-real-certs": "node node/buildDateFile.js && USE_REAL_CERTS=1 && PROTOCOL=HTTPS webpack serve --mode development",
@@ -55,7 +55,6 @@
"@storybook/addon-essentials": "^7.6.7",
"@storybook/addon-interactions": "^7.6.7",
"@storybook/addon-links": "^7.6.7",
- "@storybook/addon-onboarding": "^1.0.10",
"@storybook/blocks": "^7.6.7",
"@storybook/react": "^7.6.7",
"@storybook/react-webpack5": "^7.6.7",
diff --git a/src/App.jsx b/src/App.jsx
index ac4cf3b8c..dde24eb6b 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -20,6 +20,7 @@ import { isCordova, isWebApp } from './js/common/utils/isCordovaOrWebApp';
import { renderLog } from './js/common/utils/logging';
import Header from './js/components/Navigation/Header';
import HeaderBarSuspense from './js/components/Navigation/HeaderBarSuspense';
+import StorybookRedirect from './js/components/Widgets/StorybookRedirect';
import webAppConfig from './js/config';
import VoterStore from './js/stores/VoterStore';
import initializeFacebookSDK from './js/utils/initializeFacebookSDK';
@@ -550,6 +551,7 @@ class App extends Component {
+
diff --git a/src/js/components/Widgets/StorybookRedirect.jsx b/src/js/components/Widgets/StorybookRedirect.jsx
new file mode 100644
index 000000000..ae049c55d
--- /dev/null
+++ b/src/js/components/Widgets/StorybookRedirect.jsx
@@ -0,0 +1,12 @@
+import React from 'react';
+import { renderLog } from '../../common/utils/logging';
+
+
+// React functional component example
+export default function StorybookRedirect () {
+ renderLog('StorybookRedirect functional component');
+
+ return (
+ Redirect to Html page
+ );
+}
diff --git a/storybook-static/README.TXT b/storybook-static/README.TXT
new file mode 100644
index 000000000..a35b18821
--- /dev/null
+++ b/storybook-static/README.TXT
@@ -0,0 +1,2 @@
+Feb 13, 2024
+This empty file is needed to allow `npm run prod` to complete if Storybook static compile failed or was not run
diff --git a/webpack.config.js b/webpack.config.js
index 5cb4f07a9..0a269cd3f 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -135,6 +135,7 @@ module.exports = (env, argv) => ({
to: 'img/',
globOptions: { ignore: ['**/DO-NOT-BUNDLE/**']},
},
+ { from: 'storybook-static', to: './storybook' },
],
}),
new MomentLocalesPlugin(),