Updated and remove unused dependencies.
This commit is contained in:
		| @@ -3,14 +3,14 @@ | ||||
| const webpack = require("webpack"); | ||||
| const merge = require("webpack-merge"); | ||||
| const FriendlyErrorsPlugin = require("friendly-errors-webpack-plugin"); | ||||
| const HtmlPlugin = require("html-webpack-plugin"); | ||||
| const HtmlWebpackPlugin = require("html-webpack-plugin"); | ||||
| const helpers = require("./helpers"); | ||||
| const commonConfig = require("./webpack.config.common"); | ||||
| const environment = require("./env/dev.env"); | ||||
|  | ||||
| let webpackConfig = merge(commonConfig(true), { | ||||
|   mode: "development", | ||||
|   devtool: "cheap-module-eval-source-map", | ||||
|   devtool: "eval-cheap-module-source-map", | ||||
|   output: { | ||||
|     path: helpers.root("dist"), | ||||
|     publicPath: "/", | ||||
|   | ||||
| @@ -4,12 +4,14 @@ const { CleanWebpackPlugin } = require("clean-webpack-plugin"); | ||||
| const path = require("path"); | ||||
| const webpack = require("webpack"); | ||||
| const merge = require("webpack-merge"); | ||||
| const HtmlWebpackPlugin = require("html-webpack-plugin"); | ||||
| const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); | ||||
| const MiniCSSExtractPlugin = require("mini-css-extract-plugin"); | ||||
| const TerserPlugin = require("terser-webpack-plugin"); | ||||
|  | ||||
| const helpers = require("./helpers"); | ||||
| const commonConfig = require("./webpack.config.common"); | ||||
|  | ||||
| const isProd = process.env.NODE_ENV === "production"; | ||||
| const environment = isProd | ||||
|   ? require("./env/prod.env") | ||||
| @@ -36,6 +38,18 @@ const webpackConfig = merge(commonConfig(false), { | ||||
|     }, | ||||
|     minimize: true, | ||||
|     minimizer: [ | ||||
|       new HtmlWebpackPlugin({ | ||||
|         chunks: ["vinlottis"], | ||||
|         filename: "index.html", | ||||
|         template: "./src/templates/Index.html", | ||||
|         inject: true, | ||||
|         minify: { | ||||
|           removeComments: true, | ||||
|           collapseWhitespace: false, | ||||
|           preserveLineBreaks: true, | ||||
|           removeAttributeQuotes: true | ||||
|         } | ||||
|       }), | ||||
|       new OptimizeCSSAssetsPlugin({ | ||||
|         cssProcessorPluginOptions: { | ||||
|           preset: ["default", { discardComments: { removeAll: true } }] | ||||
| @@ -47,7 +61,7 @@ const webpackConfig = merge(commonConfig(false), { | ||||
|     ] | ||||
|   }, | ||||
|   plugins: [ | ||||
|     new CleanWebpackPlugin(), | ||||
|     new CleanWebpackPlugin(), // clean output folder | ||||
|     new webpack.EnvironmentPlugin(environment), | ||||
|     new MiniCSSExtractPlugin({ | ||||
|       filename: "css/[name].[hash:7].css" | ||||
|   | ||||
							
								
								
									
										27
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								package.json
									
									
									
									
									
								
							| @@ -14,18 +14,14 @@ | ||||
|   "author": "", | ||||
|   "license": "ISC", | ||||
|   "dependencies": { | ||||
|     "@babel/polyfill": "~7.2", | ||||
|     "@sentry/browser": "^5.27.4", | ||||
|     "@sentry/integrations": "^5.27.4", | ||||
|     "@sentry/tracing": "^5.27.4", | ||||
|     "@zxing/library": "^0.15.2", | ||||
|     "canvas-confetti": "^1.2.0", | ||||
|     "chart.js": "^2.9.3", | ||||
|     "clean-webpack-plugin": "^3.0.0", | ||||
|     "connect-mongo": "^3.2.0", | ||||
|     "express": "^4.17.1", | ||||
|     "express-session": "^1.17.0", | ||||
|     "extract-text-webpack-plugin": "^3.0.2", | ||||
|     "moment": "^2.24.0", | ||||
|     "mongoose": "^5.10.9", | ||||
|     "node-fetch": "^2.6.0", | ||||
| @@ -46,28 +42,25 @@ | ||||
|     "@babel/core": "~7.12", | ||||
|     "@babel/preset-env": "~7.12", | ||||
|     "babel-loader": "~8.0", | ||||
|     "compression-webpack-plugin": "^3.1.0", | ||||
|     "clean-webpack-plugin": "^3.0.0", | ||||
|     "core-js": "3", | ||||
|     "cross-env": "^6.0.3", | ||||
|     "css-loader": "^3.2.0", | ||||
|     "file-loader": "^4.2.0", | ||||
|     "file-loader": "^6.2.0", | ||||
|     "friendly-errors-webpack-plugin": "~1.7", | ||||
|     "google-maps-api-loader": "^1.1.1", | ||||
|     "html-webpack-plugin": "~4.5", | ||||
|     "mini-css-extract-plugin": "~0.5", | ||||
|     "optimize-css-assets-webpack-plugin": "~3.2", | ||||
|     "pm2": "^4.2.3", | ||||
|     "mini-css-extract-plugin": "~1.3.1", | ||||
|     "optimize-css-assets-webpack-plugin": "~5.0.4", | ||||
|     "redis": "^3.0.2", | ||||
|     "sass-loader": "~7.1", | ||||
|     "url-loader": "^2.2.0", | ||||
|     "vue-loader": "~15.6", | ||||
|     "sass-loader": "~10.1.0", | ||||
|     "url-loader": "^4.1.1", | ||||
|     "vue-loader": "~15.9.5", | ||||
|     "vue-style-loader": "~4.1", | ||||
|     "vue-template-compiler": "~2.6", | ||||
|     "webpack": "~4.41.5", | ||||
|     "webpack": "~5.6.0", | ||||
|     "webpack-bundle-analyzer": "^3.6.0", | ||||
|     "webpack-cli": "~3.2", | ||||
|     "webpack-dev-server": "~3.1", | ||||
|     "webpack-hot-middleware": "~2.24", | ||||
|     "webpack-cli": "~4.2.0", | ||||
|     "webpack-dev-server": "~3.11", | ||||
|     "webpack-merge": "~4.2" | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user