Browse Source

chore: Adds various packages and tweaks webpack config

master
creton32 2 months ago
parent
commit
ff3c4eb9cf
  1. 9
      package.json
  2. 8
      webpack.common.js
  3. 7
      webpack.dev.js
  4. 2576
      yarn.lock

9
package.json

@ -4,8 +4,9 @@
"description": "Siameses site",
"main": "client/index.js",
"scripts": {
"start": "node api/server",
"dev": "webpack serve --config webpack.dev.js --mode development",
"dev": "npm-run-all --parallel dev:*",
"dev:api": "nodemon api/server",
"dev:client": "webpack serve --config webpack.dev.js --mode development",
"build": "webpack --config webpack.prod.js --mode production"
},
"repository": {
@ -21,6 +22,7 @@
"@svgr/webpack": "^5.5.0",
"babel-loader": "^8.2.2",
"clean-webpack-plugin": "^3.0.0",
"core-js": "^3.9.1",
"css-loader": "^5.0.1",
"css-minimizer-webpack-plugin": "^1.2.0",
"eslint": "^7.2.0",
@ -39,6 +41,8 @@
"mini-css-extract-plugin": "^1.3.3",
"mini-svg-data-uri": "^1.2.3",
"node-sass": "^5.0.0",
"nodemon": "^2.0.7",
"npm-run-all": "^4.1.5",
"resolve-url-loader": "^3.1.2",
"sass-loader": "^10.1.1",
"terser-webpack-plugin": "^5.1.1",
@ -50,6 +54,7 @@
},
"dependencies": {
"express": "^4.17.1",
"express-validator": "^6.10.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router-dom": "^5.2.0"

8
webpack.common.js

@ -32,7 +32,13 @@ module.exports = {
loader: 'babel-loader',
options: {
presets: [
'@babel/preset-env',
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: '3.6'
}
],
'@babel/preset-react'
]
}

7
webpack.dev.js

@ -8,10 +8,13 @@ module.exports = merge(common, {
// Enable client-side routing
historyApiFallback: true,
// Only output errors, warnings, or new compilations. It hides the massive list of modules.
// stats: 'minimal',
stats: 'minimal',
hot: true,
inline: true,
host: '0.0.0.0',
port: 8080
port: 8080,
proxy: {
'/api': 'http://0.0.0.0:4000'
}
}
})

2576
yarn.lock
File diff suppressed because it is too large
View File

Loading…
Cancel
Save