Skip to content

Commit e32e7c0

Browse files
committedFeb 21, 2024·
Misc changes to use wevotedeveloper.com SSL
Updated packages related to Webpack (to no avail) Added serverWevotedeveloper.js to prove usability of Chrome with the express webserver server.
1 parent 0d5175b commit e32e7c0

File tree

5 files changed

+3347
-1289
lines changed

5 files changed

+3347
-1289
lines changed
 

‎package-lock.json

+3,332-1,273
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "wevoteusa",
33
"version": "1.0.0",
4-
"description": "WeVote front end application",
4+
"description": "We Vote front end application",
55
"main": "index.jsx",
66
"keywords": [],
77
"author": "",
@@ -72,10 +72,10 @@
7272
"babel-plugin-styled-components": "^2.1.4",
7373
"chai": "^4.3.7",
7474
"chromatic": "^10.1.0",
75-
"clean-webpack-plugin": "^3.0.0",
76-
"copy-webpack-plugin": "^11.0.0",
75+
"clean-webpack-plugin": "^4.0.0",
76+
"copy-webpack-plugin": "^12.0.2",
7777
"cordova-plugin-contacts-x": "^2.0.3",
78-
"css-minimizer-webpack-plugin": "^5.0.1",
78+
"css-minimizer-webpack-plugin": "^6.0.0",
7979
"eslint": "^7.24.0",
8080
"eslint-config-airbnb": "^18.2.1",
8181
"eslint-plugin-import": "^2.22.1",
@@ -85,9 +85,9 @@
8585
"eslint-plugin-storybook": "^0.6.15",
8686
"eslint-plugin-wdio": "^8.8.7",
8787
"eslint-webpack-plugin": "^2.4.3",
88-
"express": "^4.17.1",
88+
"express": "^5.0.0-beta.1",
8989
"file-loader": "^6.2.0",
90-
"html-webpack-plugin": "^5.3.1",
90+
"html-webpack-plugin": "^5.6.0",
9191
"jsdom": "^23.0.1",
9292
"mini-css-extract-plugin": "^2.7.1",
9393
"mocha": "^10.2.0",
@@ -99,10 +99,10 @@
9999
"unused-webpack-plugin": "^2.4.0",
100100
"webdriver": "^8.15.10",
101101
"webdriverio": "^8.15.10",
102-
"webpack": "^5.80.0",
102+
"webpack": "^5.90.3",
103103
"webpack-bundle-analyzer": "^4.8.0",
104-
"webpack-cli": "^5.0.2",
105-
"webpack-dev-server": "^4.13.3",
104+
"webpack-cli": "^5.1.4",
105+
"webpack-dev-server": "^5.0.2",
106106
"webpack-shell-plugin-next": "^2.3.1"
107107
},
108108
"dependencies": {

‎serverWevotedeveloper.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
const express = require("express");
99
const app = express();
1010
const fs = require("fs");
11-
const https = require("https");
11+
const https = require('https');
1212
const path = require("path");
13-
const webAppConfig = require("./src/js/config");
1413

1514
const port = 3000;
1615
const opts = { redirect: true };

‎src/App.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ const WeVoteBody = styled('div')`
711711
line-height: 1.4;
712712
margin: 0 auto;
713713
// max-width: 960px;
714-
//height: 100vw;
714+
height: 100vw;
715715
position: relative;
716716
z-index: 0;
717717
// this debug technique works! ${() => console.log('-----------------------------')}

‎webpack.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const isWebApp = !process.env.npm_lifecycle_script.includes('CORDOVA=1');
2121
const useRealCerts = process.env.npm_lifecycle_script.includes('USE_REAL_CERTS=1');
2222
const source = isWebApp ? 'src' : 'srcCordova';
2323
const bundleAnalysis = process.env.ANALYSIS || false; // enable the interactive bundle analyser and the Unused component analyzer
24-
const minimized = process.env.MINIMIZED === '1' || process.env.MINIMIZED === 1 || false; // enable the Terser plugin that strips comments and shrinks long variable names
2524
const verBits = process.version.split('.');
2625
const major = parseInt(verBits[0].replace('v', ''));
2726
if (major < 13) {
@@ -164,14 +163,13 @@ module.exports = (env, argv) => ({
164163
]),
165164
],
166165
devServer: {
167-
allowedHosts: 'all',
166+
allowedHosts: ['wevotedeveloper.com', 'localhost'],
168167
static: {
169-
directory: path.join(__dirname, './build'),
168+
directory: path.join(__dirname, './build/index.html'),
170169
},
171170
host: (useRealCerts ? 'wevotedeveloper.com' : 'localhost'),
172171
port,
173172
historyApiFallback: true,
174-
// open: true,
175173
...(isHTTPS ? {
176174
server: {
177175
type: 'https',
@@ -180,6 +178,8 @@ module.exports = (env, argv) => ({
180178
// For testing with Cordova and real authoritative certs
181179
key: fs.readFileSync(`./${source}/cert/wevotedeveloper.com_key.txt`),
182180
cert: fs.readFileSync(`./${source}/cert/wevotedeveloper.com.crt`),
181+
// requestCert: true,
182+
// passphrase: 'webpack-dev-server',
183183
} : {
184184
key: fs.readFileSync(`./${source}/cert/server.key`),
185185
cert: fs.readFileSync(`./${source}/cert/server.crt`),

0 commit comments

Comments
 (0)
Please sign in to comment.