| 10836 | stevensc | 1 | const path = require('path')
 | 
        
           |  |  | 2 | const isDevelopment = process.env.NODE_ENV === 'development'
 | 
        
           |  |  | 3 | const MiniCssExtractPlugin = require('mini-css-extract-plugin')
 | 
        
           |  |  | 4 | const TerserPlugin = require('terser-webpack-plugin')
 | 
        
           | 4586 | stevensc | 5 |   | 
        
           |  |  | 6 | // Add paths while bundling
 | 
        
           |  |  | 7 | const paths = {
 | 
        
           | 10836 | stevensc | 8 | 	menu: {
 | 
        
           |  |  | 9 | 		entry: './react-webpack/menu/index.js',
 | 
        
           |  |  | 10 | 		output: path.join(__dirname, 'public/react-bundles/menu'),
 | 
        
           |  |  | 11 | 		filename: 'menuBundle.js',
 | 
        
           |  |  | 12 | 	},
 | 
        
           |  |  | 13 | 	companySizes: {
 | 
        
           |  |  | 14 | 		entry: './react-webpack/settings/company-sizes/index.js',
 | 
        
           |  |  | 15 | 		output: path.join(__dirname, 'public/react-bundles/settings/company-sizes'),
 | 
        
           |  |  | 16 | 		filename: 'companySizesBundle.js',
 | 
        
           |  |  | 17 | 	},
 | 
        
           |  |  | 18 | 	competencyTypes: {
 | 
        
           |  |  | 19 | 		entry: './react-webpack/settings/competency-types/index.js',
 | 
        
           |  |  | 20 | 		output: path.join(__dirname, 'public/react-bundles/settings/competency-types'),
 | 
        
           |  |  | 21 | 		filename: 'competencyTypesBundle.js',
 | 
        
           |  |  | 22 | 	},
 | 
        
           |  |  | 23 | 	groupTypes: {
 | 
        
           |  |  | 24 | 		entry: './react-webpack/settings/groups-types/index.js',
 | 
        
           |  |  | 25 | 		output: path.join(__dirname, 'public/react-bundles/settings/group-types'),
 | 
        
           |  |  | 26 | 		filename: 'groupTypesBundle.js',
 | 
        
           |  |  | 27 | 	},
 | 
        
           |  |  | 28 | 	industries: {
 | 
        
           |  |  | 29 | 		entry: './react-webpack/settings/industries/index.js',
 | 
        
           |  |  | 30 | 		output: path.join(__dirname, 'public/react-bundles/settings/industries'),
 | 
        
           |  |  | 31 | 		filename: 'industriesBundle.js',
 | 
        
           |  |  | 32 | 	},
 | 
        
           |  |  | 33 | 	skills: {
 | 
        
           |  |  | 34 | 		entry: './react-webpack/settings/skills/index.js',
 | 
        
           |  |  | 35 | 		output: path.join(__dirname, 'public/react-bundles/settings/skills'),
 | 
        
           |  |  | 36 | 		filename: 'skillsBundle.js',
 | 
        
           |  |  | 37 | 	},
 | 
        
           |  |  | 38 | 	degrees: {
 | 
        
           |  |  | 39 | 		entry: './react-webpack/settings/degrees/index.js',
 | 
        
           |  |  | 40 | 		output: path.join(__dirname, 'public/react-bundles/settings/degrees'),
 | 
        
           |  |  | 41 | 		filename: 'degreesBundle.js',
 | 
        
           |  |  | 42 | 	},
 | 
        
           |  |  | 43 | 	categories: {
 | 
        
           |  |  | 44 | 		entry: './react-webpack/settings/job-categories/index.js',
 | 
        
           |  |  | 45 | 		output: path.join(__dirname, 'public/react-bundles/settings/job-categories'),
 | 
        
           |  |  | 46 | 		filename: 'jobCategoriesBundle.js',
 | 
        
           |  |  | 47 | 	},
 | 
        
           |  |  | 48 | 	profile: {
 | 
        
           |  |  | 49 | 		entry: './react-webpack/profile/index.js',
 | 
        
           |  |  | 50 | 		output: path.join(__dirname, 'public/react-bundles/profile'),
 | 
        
           |  |  | 51 | 		filename: 'profileBundle.js',
 | 
        
           |  |  | 52 | 	},
 | 
        
           |  |  | 53 | 	jobs: {
 | 
        
           |  |  | 54 | 		entry: './react-webpack/jobs/index.js',
 | 
        
           |  |  | 55 | 		output: path.join(__dirname, 'public/react-bundles/jobs'),
 | 
        
           |  |  | 56 | 		filename: 'jobsBundle.js',
 | 
        
           |  |  | 57 | 	},
 | 
        
           |  |  | 58 | 	feeds: {
 | 
        
           |  |  | 59 | 		entry: './react-webpack/feeds/index.js',
 | 
        
           |  |  | 60 | 		output: path.join(__dirname, 'public/react-bundles/feeds'),
 | 
        
           |  |  | 61 | 		filename: 'feedsBundle.js',
 | 
        
           |  |  | 62 | 	},
 | 
        
           |  |  | 63 | 	followers: {
 | 
        
           |  |  | 64 | 		entry: './react-webpack/follower/index.js',
 | 
        
           |  |  | 65 | 		output: path.join(__dirname, 'public/react-bundles/followers'),
 | 
        
           |  |  | 66 | 		filename: 'followersBundle.js',
 | 
        
           |  |  | 67 | 	},
 | 
        
           |  |  | 68 | 	recruitment_and_selection_vacancies: {
 | 
        
           |  |  | 69 | 		entry: './react-webpack/recruitment_and_selection/vacancies/index.js',
 | 
        
           |  |  | 70 | 		output: path.join(__dirname, 'public/react-bundles/recruitment_and_selection/vacancies'),
 | 
        
           |  |  | 71 | 		filename: 'vacanciesBundle.js',
 | 
        
           |  |  | 72 | 	},
 | 
        
           |  |  | 73 | 	recruitment_and_selection_candidates: {
 | 
        
           |  |  | 74 | 		entry: './react-webpack/recruitment_and_selection/candidates/index.js',
 | 
        
           |  |  | 75 | 		output: path.join(__dirname, 'public/react-bundles/recruitment_and_selection/candidates'),
 | 
        
           |  |  | 76 | 		filename: 'candidatesBundle.js',
 | 
        
           |  |  | 77 | 	},
 | 
        
           |  |  | 78 | 	recruitment_and_selection_interviews: {
 | 
        
           |  |  | 79 | 		entry: './react-webpack/recruitment_and_selection/interviews/index.js',
 | 
        
           |  |  | 80 | 		output: path.join(__dirname, 'public/react-bundles/recruitment_and_selection/interviews'),
 | 
        
           |  |  | 81 | 		filename: 'interviewsBundle.js',
 | 
        
           | 11183 | stevensc | 82 | 	},
 | 
        
           | 11467 | stevensc | 83 | 	chat: {
 | 
        
           | 11379 | stevensc | 84 | 		entry: './react-webpack/chat/index.js',
 | 
        
           |  |  | 85 | 		output: path.join(__dirname, 'public/react-bundles/chat'),
 | 
        
           |  |  | 86 | 		filename: 'chatBundle.js',
 | 
        
           | 11350 | nelberth | 87 | 	},
 | 
        
           | 11349 | nelberth | 88 | 	mobileChat: {
 | 
        
           | 11379 | stevensc | 89 | 		entry: './react-webpack/mobile-chat/index.js',
 | 
        
           |  |  | 90 | 		output: path.join(__dirname, 'public/react-bundles/mobileChat'),
 | 
        
           |  |  | 91 | 		filename: 'mobileChatBundle.js',
 | 
        
           | 11467 | stevensc | 92 | 	},
 | 
        
           | 11183 | stevensc | 93 | 	objetives_and_goals_planing: {
 | 
        
           |  |  | 94 | 		objetives: {
 | 
        
           |  |  | 95 | 			entry: './react-webpack/objetives_and_goals-planing/objetives/index.js',
 | 
        
           |  |  | 96 | 			output: path.join(__dirname, 'public/react-bundles/objetives_and_goals-planing/objetives'),
 | 
        
           |  |  | 97 | 			filename: 'objetivesBundle.js',
 | 
        
           | 11468 | stevensc | 98 | 		},
 | 
        
           |  |  | 99 | 		goals: {
 | 
        
           |  |  | 100 | 			entry: './react-webpack/objetives_and_goals-planing/goals/index.js',
 | 
        
           |  |  | 101 | 			output: path.join(__dirname, 'public/react-bundles/objetives_and_goals-planing/goals'),
 | 
        
           |  |  | 102 | 			filename: 'goalsBundle.js',
 | 
        
           | 11546 | stevensc | 103 | 		},
 | 
        
           |  |  | 104 | 		tasks: {
 | 
        
           |  |  | 105 | 			entry: './react-webpack/objetives_and_goals-planing/tasks/index.js',
 | 
        
           |  |  | 106 | 			output: path.join(__dirname, 'public/react-bundles/objetives_and_goals-planing/tasks'),
 | 
        
           |  |  | 107 | 			filename: 'tasksBundle.js',
 | 
        
           | 11183 | stevensc | 108 | 		}
 | 
        
           | 11960 | stevensc | 109 | 	},
 | 
        
           |  |  | 110 | 	performance_evaluations: {
 | 
        
           |  |  | 111 | 		forms: {
 | 
        
           |  |  | 112 | 			entry: './react-webpack/performance_evaluations/forms/index.js',
 | 
        
           |  |  | 113 | 			output: path.join(__dirname, 'public/react-bundles/performance_evaluations/forms'),
 | 
        
           |  |  | 114 | 			filename: 'formsBundle.js',
 | 
        
           | 12264 | stevensc | 115 | 		},
 | 
        
           |  |  | 116 | 		evaluations: {
 | 
        
           |  |  | 117 | 			entry: './react-webpack/performance_evaluations/evaluations/index.js',
 | 
        
           |  |  | 118 | 			output: path.join(__dirname, 'public/react-bundles/performance_evaluations/evaluations'),
 | 
        
           |  |  | 119 | 			filename: 'evaluationsBundle.js',
 | 
        
           | 11960 | stevensc | 120 | 		}
 | 
        
           | 12475 | stevensc | 121 | 	},
 | 
        
           |  |  | 122 | 	organizational_climate: {
 | 
        
           |  |  | 123 | 		forms: {
 | 
        
           |  |  | 124 | 			entry: './react-webpack/organizational-climate/form/index.js',
 | 
        
           |  |  | 125 | 			output: path.join(__dirname, 'public/react-bundles/organizational-climate/form'),
 | 
        
           |  |  | 126 | 			filename: 'organizationalFormBundle.js',
 | 
        
           |  |  | 127 | 		}
 | 
        
           | 14183 | stevensc | 128 | 	},
 | 
        
           |  |  | 129 | 	jobDescription: {
 | 
        
           |  |  | 130 | 		entry: './react-webpack/job_description/index.js',
 | 
        
           |  |  | 131 | 		output: path.join(__dirname, 'public/react-bundles/job_description'),
 | 
        
           |  |  | 132 | 		filename: 'jobDescription.js',
 | 
        
           |  |  | 133 | 	},
 | 
        
           | 10836 | stevensc | 134 | }
 | 
        
           | 4586 | stevensc | 135 |   | 
        
           |  |  | 136 | // change active path here
 | 
        
           | 15319 | stevensc | 137 | const currentPath = paths.recruitment_and_selection_candidates
 | 
        
           | 4586 | stevensc | 138 |   | 
        
           |  |  | 139 | module.exports = {
 | 
        
           | 10836 | stevensc | 140 | 	entry: currentPath.entry,
 | 
        
           |  |  | 141 | 	output: {
 | 
        
           |  |  | 142 | 		path: currentPath.output,
 | 
        
           |  |  | 143 | 		filename: currentPath.filename,
 | 
        
           |  |  | 144 | 	},
 | 
        
           |  |  | 145 | 	watch: isDevelopment ? true : false,
 | 
        
           |  |  | 146 | 	mode: isDevelopment ? 'development' : 'production',
 | 
        
           |  |  | 147 | 	resolve: {
 | 
        
           |  |  | 148 | 		extensions: ['.js', '.jsx', '.scss'],
 | 
        
           |  |  | 149 | 	},
 | 
        
           |  |  | 150 | 	module: {
 | 
        
           |  |  | 151 | 		rules: [
 | 
        
           |  |  | 152 | 			{
 | 
        
           |  |  | 153 | 				test: /(js|jsx)$/,
 | 
        
           |  |  | 154 | 				use: ['babel-loader'],
 | 
        
           |  |  | 155 | 				exclude: /node_modules/,
 | 
        
           |  |  | 156 | 			},
 | 
        
           |  |  | 157 | 			{
 | 
        
           |  |  | 158 | 				test: /\.css$/i,
 | 
        
           |  |  | 159 | 				use: [MiniCssExtractPlugin.loader, 'css-loader'],
 | 
        
           |  |  | 160 | 			},
 | 
        
           |  |  | 161 | 			{
 | 
        
           |  |  | 162 | 				test: /\.module\.s(a|c)ss$/,
 | 
        
           |  |  | 163 | 				use: [
 | 
        
           |  |  | 164 | 					MiniCssExtractPlugin.loader,
 | 
        
           |  |  | 165 | 					{
 | 
        
           |  |  | 166 | 						loader: 'css-loader',
 | 
        
           |  |  | 167 | 						options: {
 | 
        
           |  |  | 168 | 							modules: {
 | 
        
           |  |  | 169 | 								localIdentName: '[local]--[hash:base64:5]',
 | 
        
           |  |  | 170 | 							},
 | 
        
           |  |  | 171 | 							sourceMap: isDevelopment,
 | 
        
           |  |  | 172 | 						},
 | 
        
           |  |  | 173 | 					},
 | 
        
           |  |  | 174 | 					{
 | 
        
           |  |  | 175 | 						loader: 'sass-loader',
 | 
        
           |  |  | 176 | 						options: {
 | 
        
           |  |  | 177 | 							sourceMap: isDevelopment,
 | 
        
           |  |  | 178 | 						},
 | 
        
           |  |  | 179 | 					},
 | 
        
           |  |  | 180 | 				],
 | 
        
           |  |  | 181 | 			},
 | 
        
           |  |  | 182 | 			{
 | 
        
           |  |  | 183 | 				test: /\.s(a|c)ss$/,
 | 
        
           |  |  | 184 | 				exclude: /\.module.(s(a|c)ss)$/,
 | 
        
           |  |  | 185 | 				use: [
 | 
        
           |  |  | 186 | 					MiniCssExtractPlugin.loader,
 | 
        
           |  |  | 187 | 					'css-loader',
 | 
        
           |  |  | 188 | 					{
 | 
        
           |  |  | 189 | 						loader: 'sass-loader',
 | 
        
           |  |  | 190 | 						options: {
 | 
        
           |  |  | 191 | 							sourceMap: isDevelopment,
 | 
        
           |  |  | 192 | 						},
 | 
        
           |  |  | 193 | 					},
 | 
        
           |  |  | 194 | 				],
 | 
        
           |  |  | 195 | 			},
 | 
        
           |  |  | 196 | 		],
 | 
        
           |  |  | 197 | 	},
 | 
        
           |  |  | 198 | 	plugins: [
 | 
        
           |  |  | 199 | 		new MiniCssExtractPlugin({
 | 
        
           |  |  | 200 | 			filename: '[name].css',
 | 
        
           |  |  | 201 | 			chunkFilename: '[id].css',
 | 
        
           |  |  | 202 | 		}),
 | 
        
           |  |  | 203 | 	],
 | 
        
           |  |  | 204 | 	optimization: {
 | 
        
           |  |  | 205 | 		minimizer: [
 | 
        
           |  |  | 206 | 			new TerserPlugin({
 | 
        
           |  |  | 207 | 				extractComments: false,
 | 
        
           |  |  | 208 | 			}),
 | 
        
           |  |  | 209 | 		],
 | 
        
           |  |  | 210 | 	},
 | 
        
           |  |  | 211 | }
 |