Browse Source

A few little fix-ups

develop
Alex Mikhalev 6 years ago
parent
commit
6e95d091ae
  1. 6
      client/tsconfig.json
  2. 23
      client/webpack.config.js
  3. 61
      package.json
  4. 4735
      yarn.lock

6
client/tsconfig.json

@ -10,7 +10,7 @@
], ],
"types": [ "types": [
"webpack-env", "webpack-env",
"core-js", // "core-js",
"node" "node"
], ],
"baseUrl": "..", "baseUrl": "..",
@ -24,8 +24,8 @@
} }
}, },
"include": [ "include": [
"./client/**/*.ts", "./**/*.ts",
"./client/**/*.tsx" "./**/*.tsx"
], ],
"exclude": [], "exclude": [],
"references": [{ "references": [{

23
client/webpack.config.js

@ -2,9 +2,9 @@ const path = require("path");
const webpack = require("webpack"); const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin");
const FaviconsWebpackPlugin = require("favicons-webpack-plugin"); // const FaviconsWebpackPlugin = require("favicons-webpack-plugin");
const CaseSensitivePathsPlugin = require("case-sensitive-paths-webpack-plugin"); const CaseSensitivePathsPlugin = require("case-sensitive-paths-webpack-plugin");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const TerserPlugin = require("terser-webpack-plugin");
const DashboardPlugin = require("webpack-dashboard/plugin"); const DashboardPlugin = require("webpack-dashboard/plugin");
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer") const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin; .BundleAnalyzerPlugin;
@ -170,21 +170,17 @@ function getConfig(env) {
} }
: undefined : undefined
}), }),
new FaviconsWebpackPlugin({ // new FaviconsWebpackPlugin({
logo: path.resolve(paths.clientDir, "images", "favicon-96x96.png"), // logo: path.resolve(paths.clientDir, "images", "favicon-96x96.png"),
emitStatis: false, // emitStatis: false,
prefix: "static/icons-[hash]/" // prefix: "static/icons-[hash]/"
}), // }),
// Makes some environment variables available to the JS code, for example: // Makes some environment variables available to the JS code, for example:
// if (process.env.NODE_ENV === "production") { ... }. See `./env.js`. // if (process.env.NODE_ENV === "production") { ... }. See `./env.js`.
// It is absolutely essential that NODE_ENV was set to production here. // It is absolutely essential that NODE_ENV was set to production here.
// Otherwise React will be compiled in the very slow development mode. // Otherwise React will be compiled in the very slow development mode.
new webpack.DefinePlugin(environ.stringified), new webpack.DefinePlugin(environ.stringified),
new CaseSensitivePathsPlugin(), new CaseSensitivePathsPlugin(),
isProd &&
new UglifyJsPlugin({
sourceMap: shouldUseSourceMap
}),
isDev && new webpack.HotModuleReplacementPlugin(), isDev && new webpack.HotModuleReplacementPlugin(),
new ForkTsCheckerWebpackPlugin({ new ForkTsCheckerWebpackPlugin({
checkSyntacticErrors: true, checkSyntacticErrors: true,
@ -245,7 +241,10 @@ function getConfig(env) {
module: { rules }, module: { rules },
plugins: plugins, plugins: plugins,
optimization: { optimization: {
namedModules: isProd namedModules: isProd,
minimizer: isProd ? [new TerserPlugin({
sourceMap: shouldUseSourceMap
})] : [],
}, },
devServer: { devServer: {
hot: true, hot: true,

61
package.json

@ -51,17 +51,17 @@
"bcrypt": "^3.0.0", "bcrypt": "^3.0.0",
"body-parser": "^1.18.3", "body-parser": "^1.18.3",
"chalk": "^2.4.1", "chalk": "^2.4.1",
"cli-ux": "^4.8.1", "cli-ux": "^5.3.1",
"express": "^4.16.3", "express": "^4.16.3",
"express-promise-router": "^3.0.3", "express-promise-router": "^3.0.3",
"globby": "^8.0.1", "globby": "^10.0.1",
"jsonwebtoken": "^8.3.0", "jsonwebtoken": "^8.3.0",
"lodash": "^4.17.10", "lodash": "^4.17.10",
"mobx": "^5.1.0", "mobx": "^5.1.0",
"mobx-utils": "^5.0.1", "mobx-utils": "^5.0.1",
"module-alias": "^2.1.0", "module-alias": "^2.1.0",
"moment": "^2.22.2", "moment": "^2.22.2",
"mqtt": "^2.18.8", "mqtt": "^3.0.0",
"pg": "^7.4.3", "pg": "^7.4.3",
"pino": "^5.4.0", "pino": "^5.4.0",
"pino-http": "^4.2.0", "pino-http": "^4.2.0",
@ -69,20 +69,21 @@
"reflect-metadata": "^0.1.12", "reflect-metadata": "^0.1.12",
"serializr": "^1.3.0", "serializr": "^1.3.0",
"split2": "^3.0.0", "split2": "^3.0.0",
"through2": "^2.0.3", "terser-webpack-plugin": "^1.3.0",
"through2": "^3.0.1",
"typeorm": "^0.2.7", "typeorm": "^0.2.7",
"ws": "^6.0.0" "ws": "^7.1.1"
}, },
"devDependencies": { "devDependencies": {
"@types/async": "^2.0.49", "@types/async": "^3.0.0",
"@types/bcrypt": "^2.0.0", "@types/bcrypt": "^3.0.0",
"@types/classnames": "^2.2.6", "@types/classnames": "^2.2.6",
"@types/core-js": "^2.5.0", "@types/core-js": "^2.5.0",
"@types/express": "^4.16.0", "@types/express": "^4.16.0",
"@types/jsonwebtoken": "^7.2.8", "@types/jsonwebtoken": "^8.3.2",
"@types/lodash": "^4.14.116", "@types/lodash": "^4.14.116",
"@types/module-alias": "^2.0.0", "@types/module-alias": "^2.0.0",
"@types/node": "^10.9.4", "@types/node": "^11.11.3",
"@types/object-assign": "^4.0.30", "@types/object-assign": "^4.0.30",
"@types/pino": "^5.20.0", "@types/pino": "^5.20.0",
"@types/prop-types": "^15.5.5", "@types/prop-types": "^15.5.5",
@ -96,20 +97,20 @@
"@types/through2": "^2.0.33", "@types/through2": "^2.0.33",
"@types/webpack-env": "^1.13.6", "@types/webpack-env": "^1.13.6",
"@types/ws": "^6.0.0", "@types/ws": "^6.0.0",
"async": "^2.6.1", "async": "^3.1.0",
"autoprefixer": "^9.1.3", "autoprefixer": "^9.1.3",
"cache-loader": "^1.2.2", "cache-loader": "^4.1.0",
"case-sensitive-paths-webpack-plugin": "^2.1.2", "case-sensitive-paths-webpack-plugin": "^2.1.2",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"css-loader": "^1.0.0", "css-loader": "^3.1.0",
"dotenv": "^6.0.0", "dotenv": "^8.0.0",
"favicons-webpack-plugin": "^0.0.9", "favicons-webpack-plugin": "^0.0.9",
"file-loader": "^2.0.0", "file-loader": "^4.1.0",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"fork-ts-checker-webpack-plugin": "^0.4.9", "fork-ts-checker-webpack-plugin": "^1.4.3",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^0.4.2", "mini-css-extract-plugin": "^0.8.0",
"mobx-react": "^5.2.5", "mobx-react": "^6.1.1",
"mobx-react-devtools": "^6.0.3", "mobx-react-devtools": "^6.0.3",
"mobx-react-router": "^4.0.4", "mobx-react-router": "^4.0.4",
"node-sass": "^4.9.3", "node-sass": "^4.9.3",
@ -118,36 +119,34 @@
"object-assign": "^4.1.1", "object-assign": "^4.1.1",
"postcss-flexbugs-fixes": "^4.1.0", "postcss-flexbugs-fixes": "^4.1.0",
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"postcss-preset-env": "^5.3.0", "postcss-preset-env": "^6.7.0",
"promise": "^8.0.1", "promise": "^8.0.1",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"query-string": "^6.1.0", "query-string": "^6.1.0",
"react": "^16.6.3", "react": "^16.6.3",
"react-dev-utils": "^5.0.2", "react-dev-utils": "^9.0.1",
"react-dom": "^16.6.3", "react-dom": "^16.6.3",
"react-hot-loader": "^4.3.5", "react-hot-loader": "^4.3.5",
"react-router": "^4.3.1", "react-router": "^5.0.1",
"react-router-dom": "^4.3.1", "react-router-dom": "^5.0.1",
"react-sortable-hoc": "^0.8.3", "react-sortable-hoc": "^1.9.1",
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
"semantic-ui-css": "^2.3.3", "semantic-ui-css": "^2.3.3",
"semantic-ui-react": "^0.82.3", "semantic-ui-react": "^0.87.3",
"source-map-loader": "^0.2.4", "source-map-loader": "^0.2.4",
"style-loader": "^0.23.0", "style-loader": "^0.23.0",
"thread-loader": "^1.2.0", "thread-loader": "^2.1.2",
"ts-loader": "^4.5.0", "ts-loader": "^6.0.4",
"tslint": "^5.11.0", "tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0", "tslint-config-prettier": "^1.15.0",
"tslint-consistent-codestyle": "^1.13.3", "tslint-consistent-codestyle": "^1.13.3",
"tslint-react": "^3.6.0", "tslint-react": "^4.0.0",
"typescript": "^3.0.3", "typescript": "^3.0.3",
"uglify-es": "^3.3.9", "url-loader": "^2.1.0",
"uglifyjs-webpack-plugin": "^1.3.0",
"url-loader": "^1.1.1",
"webpack": "^4.17.1", "webpack": "^4.17.1",
"webpack-bundle-analyzer": "^2.13.1", "webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.1.0", "webpack-cli": "^3.1.0",
"webpack-dashboard": "^2.0.0", "webpack-dashboard": "^3.0.7",
"webpack-dev-server": "^3.1.7" "webpack-dev-server": "^3.1.7"
} }
} }

4735
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save