Skip to content

Commit

Permalink
fix: fix webpack validation
Browse files Browse the repository at this point in the history
- update npm deps
- fix webpack config
  • Loading branch information
denchiklut committed Aug 27, 2023
1 parent b89de03 commit 17c6a30
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 39 deletions.
60 changes: 30 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,49 +23,49 @@
"setup": "sh setup.sh"
},
"dependencies": {
"@babel/runtime": "7.22.6",
"@babel/runtime": "7.22.11",
"@loadable/component": "^5.15.3",
"@loadable/server": "5.16.1",
"classnames": "^2.3.2",
"core-js": "^3.31.1",
"core-js": "^3.32.1",
"debug": "^4.3.4",
"dotenv": "^16.3.1",
"morgan": "^1.10.0",
"postcss": "^8.4.27",
"postcss": "^8.4.28",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^6.14.2",
"react-router-dom": "^6.14.2",
"react-router": "^6.15.0",
"react-router-dom": "^6.15.0",
"winston": "^3.10.0",
"workbox-window": "^7.0.0",
"zod": "^3.21.4"
"zod": "^3.22.2"
},
"devDependencies": {
"@babel/cli": "7.22.9",
"@babel/core": "7.22.9",
"@babel/plugin-transform-runtime": "^7.22.9",
"@babel/preset-env": "7.22.9",
"@babel/cli": "7.22.10",
"@babel/core": "7.22.11",
"@babel/plugin-transform-runtime": "^7.22.10",
"@babel/preset-env": "7.22.10",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@babel/preset-typescript": "^7.22.11",
"@babel/register": "7.22.5",
"@loadable/babel-plugin": "5.16.1",
"@loadable/webpack-plugin": "^5.15.2",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@svgr/webpack": "^8.0.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@svgr/webpack": "^8.1.0",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/jest-dom": "^6.1.2",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/classnames": "^2.3.0",
"@types/debug": "^4.1.8",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.3",
"@types/jest": "^29.5.4",
"@types/loadable__component": "^5.13.4",
"@types/loadable__server": "^5.12.6",
"@types/loadable__webpack-plugin": "^5.7.3",
"@types/mini-css-extract-plugin": "^2.5.0",
"@types/morgan": "^1.9.4",
"@types/node": "^20.4.4",
"@types/morgan": "^1.9.5",
"@types/node": "^20.5.6",
"@types/react-dom": "^18.2.7",
"@types/react-router-dom": "^5.3.3",
"@types/require-from-string": "^1.2.1",
Expand All @@ -74,46 +74,46 @@
"@types/webpack-env": "^1.18.1",
"@types/webpack-hot-middleware": "^2.25.6",
"@types/webpack-node-externals": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"autoprefixer": "^10.4.14",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"autoprefixer": "^10.4.15",
"babel-loader": "^9.1.3",
"copy-webpack-plugin": "^11.0.0",
"cross-env": "^7.0.3",
"css-loader": "6.8.1",
"cssnano": "^6.0.1",
"eslint": "^8.45.0",
"eslint": "^8.48.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react": "^7.33.2",
"express": "^4.18.2",
"fork-ts-checker-webpack-plugin": "^8.0.0",
"html-loader": "^4.2.0",
"html-webpack-plugin": "^5.5.3",
"husky": "^8.0.3",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.6.1",
"jest-environment-jsdom": "^29.6.1",
"lint-staged": "^13.2.3",
"jest": "^29.6.4",
"jest-environment-jsdom": "^29.6.4",
"lint-staged": "^14.0.1",
"mini-css-extract-plugin": "^2.7.6",
"nodemon": "^3.0.1",
"npm-run-all": "^4.1.5",
"postcss-loader": "^7.3.3",
"postcss-scss": "^4.0.6",
"prettier": "^3.0.0",
"postcss-scss": "^4.0.7",
"prettier": "^3.0.2",
"react-refresh": "^0.14.0",
"require-from-string": "^2.0.2",
"rimraf": "^5.0.1",
"sass": "^1.64.1",
"sass": "^1.66.1",
"sass-loader": "^13.3.2",
"serve-favicon": "^2.5.0",
"stylelint": "^15.10.2",
"stylelint": "^15.10.3",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-standard-scss": "^10.0.0",
"stylelint-order": "^6.0.3",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.1.6",
"typescript": "^5.2.2",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-middleware": "^6.1.1",
Expand Down
12 changes: 5 additions & 7 deletions src/server/utils/bootstrap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@ export const bootstrap = (server: Express) => {
const port = 3000
const host = 'localhost'
const protocol = sslIsExist ? 'https' : 'http'
const url = joinPath(`${protocol}://${host}`, basename)
const url = joinPath(`${protocol}://${host}:${port}`, basename)
const message = `Application is started on 🌎 ${url}`

if (sslIsExist) {
https
.createServer(
{ key: readFileSync(sslKeyPath), cert: readFileSync(sslCertPath) },
server
)
.listen(port, () => logger.info(message))
const key = readFileSync(sslKeyPath)
const cert = readFileSync(sslCertPath)

https.createServer({ key, cert }, server).listen(port, () => logger.info(message))
} else {
http.createServer(server).listen(port, () => logger.info(message))
}
Expand Down
2 changes: 1 addition & 1 deletion webpack/configs/client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const config = {
plugins.copyPlugin,
plugins.hmr,
plugins.definePlugin(),
plugins.htmlWebpackPlugin()
...plugins.htmlWebpackPlugin()
].filter(Boolean),
optimization
} as Configuration
Expand Down
2 changes: 1 addition & 1 deletion webpack/configs/spa.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const config = {
plugins.tsChecker,
plugins.htmlWebpackPlugin,
plugins.definePlugin({ spa: true }),
plugins.htmlWebpackPlugin({ spa: true })
...plugins.htmlWebpackPlugin({ spa: true })
].filter(Boolean)
} as Configuration

Expand Down

0 comments on commit 17c6a30

Please sign in to comment.