Skip to content

Commit

Permalink
Updated webpack to use wevotedeveloper.com SSL if configured
Browse files Browse the repository at this point in the history
Works on Safari and Firefox for webapp, but not on Chrome.
Works on Chrome for local Python API server.
  • Loading branch information
SailingSteve committed Feb 20, 2024
1 parent 7f1f25e commit 8753777
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/js/components/Widgets/StorybookRedirect.jsx
Original file line number Diff line number Diff line change
@@ -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 (
<a href="/storybook?path=/docs/design-system--docs">Redirect to Html page</a>
);
}
4 changes: 3 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ if (major < 13) {
} else {
console.log(`Node version is: ${process.version}`);
}
console.log('useRealCerts in webpack.config.js ', useRealCerts);
console.log('key: ', fs.readFileSync(`./${source}/cert/wevotedeveloper.com.crt`).toString());

module.exports = (env, argv) => ({
entry: path.resolve(__dirname, `./${source}/index.jsx`),
Expand Down Expand Up @@ -166,7 +168,7 @@ module.exports = (env, argv) => ({
static: {
directory: path.join(__dirname, './build'),
},
host: 'localhost',
host: (useRealCerts ? 'wevotedeveloper.com' : 'localhost'),
port,
historyApiFallback: true,
// open: true,
Expand Down

0 comments on commit 8753777

Please sign in to comment.