Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 10425 | Rev 11024 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 10425 Rev 10836
Línea 1... Línea 1...
1
const path = require("path");
1
const path = require('path')
2
const isDevelopment = process.env.NODE_ENV === "development";
2
const isDevelopment = process.env.NODE_ENV === 'development'
3
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
4
const TerserPlugin = require("terser-webpack-plugin");
4
const TerserPlugin = require('terser-webpack-plugin')
Línea 5... Línea 5...
5
 
5
 
6
// Add paths while bundling
6
// Add paths while bundling
7
const paths = {
7
const paths = {
8
  menu: {
8
	menu: {
9
    entry: "./react-webpack/menu/index.js",
9
		entry: './react-webpack/menu/index.js',
10
    output: path.join(__dirname, "public/react-bundles/menu"),
10
		output: path.join(__dirname, 'public/react-bundles/menu'),
11
    filename: "menuBundle.js",
11
		filename: 'menuBundle.js',
12
  },
12
	},
13
  companySizes: {
13
	companySizes: {
14
    entry: "./react-webpack/settings/company-sizes/index.js",
14
		entry: './react-webpack/settings/company-sizes/index.js',
15
    output: path.join(__dirname, "public/react-bundles/settings/company-sizes"),
15
		output: path.join(__dirname, 'public/react-bundles/settings/company-sizes'),
16
    filename: "companySizesBundle.js",
16
		filename: 'companySizesBundle.js',
17
  },
17
	},
18
  competencyTypes: {
18
	competencyTypes: {
19
    entry: "./react-webpack/settings/competency-types/index.js",
19
		entry: './react-webpack/settings/competency-types/index.js',
20
    output: path.join(__dirname, "public/react-bundles/settings/competency-types"),
20
		output: path.join(__dirname, 'public/react-bundles/settings/competency-types'),
21
    filename: "competencyTypesBundle.js",
21
		filename: 'competencyTypesBundle.js',
22
  },
22
	},
23
  groupTypes: {
23
	groupTypes: {
24
    entry: "./react-webpack/settings/groups-types/index.js",
24
		entry: './react-webpack/settings/groups-types/index.js',
25
    output: path.join(__dirname, "public/react-bundles/settings/group-types"),
25
		output: path.join(__dirname, 'public/react-bundles/settings/group-types'),
26
    filename: "groupTypesBundle.js",
26
		filename: 'groupTypesBundle.js',
27
  },
27
	},
28
  industries: {
28
	industries: {
29
    entry: "./react-webpack/settings/industries/index.js",
29
		entry: './react-webpack/settings/industries/index.js',
30
    output: path.join(__dirname, "public/react-bundles/settings/industries"),
30
		output: path.join(__dirname, 'public/react-bundles/settings/industries'),
31
    filename: "industriesBundle.js",
31
		filename: 'industriesBundle.js',
32
  },
32
	},
33
  skills: {
33
	skills: {
34
    entry: "./react-webpack/settings/skills/index.js",
34
		entry: './react-webpack/settings/skills/index.js',
35
    output: path.join(__dirname, "public/react-bundles/settings/skills"),
35
		output: path.join(__dirname, 'public/react-bundles/settings/skills'),
36
    filename: "skillsBundle.js",
36
		filename: 'skillsBundle.js',
37
  },
37
	},
38
  degrees: {
38
	degrees: {
39
    entry: "./react-webpack/settings/degrees/index.js",
39
		entry: './react-webpack/settings/degrees/index.js',
40
    output: path.join(__dirname, "public/react-bundles/settings/degrees"),
40
		output: path.join(__dirname, 'public/react-bundles/settings/degrees'),
41
    filename: "degreesBundle.js",
41
		filename: 'degreesBundle.js',
42
  },
42
	},
43
  categories: {
43
	categories: {
44
    entry: "./react-webpack/settings/job-categories/index.js",
44
		entry: './react-webpack/settings/job-categories/index.js',
45
    output: path.join(__dirname, "public/react-bundles/settings/job-categories"),
45
		output: path.join(__dirname, 'public/react-bundles/settings/job-categories'),
46
    filename: "jobCategoriesBundle.js",
46
		filename: 'jobCategoriesBundle.js',
47
  },
47
	},
48
  profile: {
48
	profile: {
49
    entry: "./react-webpack/profile/index.js",
49
		entry: './react-webpack/profile/index.js',
50
    output: path.join(__dirname, "public/react-bundles/profile"),
50
		output: path.join(__dirname, 'public/react-bundles/profile'),
51
    filename: "profileBundle.js",
51
		filename: 'profileBundle.js',
52
  },
52
	},
53
  jobs: {
53
	jobs: {
54
    entry: "./react-webpack/jobs/index.js",
54
		entry: './react-webpack/jobs/index.js',
55
    output: path.join(__dirname, "public/react-bundles/jobs"),
55
		output: path.join(__dirname, 'public/react-bundles/jobs'),
56
    filename: "jobsBundle.js",
56
		filename: 'jobsBundle.js',
57
  },
57
	},
58
  feeds: {
58
	feeds: {
59
    entry: "./react-webpack/feeds/index.js",
59
		entry: './react-webpack/feeds/index.js',
60
    output: path.join(__dirname, "public/react-bundles/feeds"),
60
		output: path.join(__dirname, 'public/react-bundles/feeds'),
61
    filename: "feedsBundle.js",
61
		filename: 'feedsBundle.js',
62
  },
62
	},
63
  followers: {
63
	followers: {
64
    entry: "./react-webpack/follower/index.js",
64
		entry: './react-webpack/follower/index.js',
65
    output: path.join(__dirname, "public/react-bundles/followers"),
65
		output: path.join(__dirname, 'public/react-bundles/followers'),
66
    filename: "followersBundle.js",
66
		filename: 'followersBundle.js',
67
  },
67
	},
68
  recruitment_and_selection_vacancies: {
68
	recruitment_and_selection_vacancies: {
69
    entry: "./react-webpack/recruitment_and_selection/vacancies/index.js",
69
		entry: './react-webpack/recruitment_and_selection/vacancies/index.js',
70
    output: path.join(__dirname, "public/react-bundles/recruitment_and_selection/vacancies"),
70
		output: path.join(__dirname, 'public/react-bundles/recruitment_and_selection/vacancies'),
71
    filename: "vacanciesBundle.js",
71
		filename: 'vacanciesBundle.js',
72
  },
72
	},
73
  recruitment_and_selection_candidates: {
73
	recruitment_and_selection_candidates: {
74
    entry: "./react-webpack/recruitment_and_selection/candidates/index.js",
74
		entry: './react-webpack/recruitment_and_selection/candidates/index.js',
75
    output: path.join(__dirname, "public/react-bundles/recruitment_and_selection/candidates"),
75
		output: path.join(__dirname, 'public/react-bundles/recruitment_and_selection/candidates'),
76
    filename: "candidatesBundle.js",
76
		filename: 'candidatesBundle.js',
77
  },
77
	},
78
  recruitment_and_selection_interviews: {
78
	recruitment_and_selection_interviews: {
79
    entry: "./react-webpack/recruitment_and_selection/interviews/index.js",
79
		entry: './react-webpack/recruitment_and_selection/interviews/index.js',
80
    output: path.join(__dirname, "public/react-bundles/recruitment_and_selection/interviews"),
80
		output: path.join(__dirname, 'public/react-bundles/recruitment_and_selection/interviews'),
81
    filename: "interviewsBundle.js",
81
		filename: 'interviewsBundle.js',
82
  }
82
	}
Línea 83... Línea 83...
83
};
83
}
84
 
84
 
Línea 85... Línea 85...
85
// change active path here  
85
// change active path here  
86
const currentPath = paths.recruitment_and_selection_interviews;
-
 
87
 
-
 
88
module.exports = {
-
 
89
  entry: currentPath.entry,
-
 
90
  output: {
-
 
91
    path: currentPath.output,
-
 
92
    filename: currentPath.filename,
-
 
93
  },
-
 
94
  watch: isDevelopment ? true : false,
-
 
95
  mode: isDevelopment ? "development" : "production",
-
 
96
  resolve: {
-
 
97
    extensions: [".js", ".jsx", ".scss"],
-
 
98
  },
-
 
99
  module: {
-
 
100
    rules: [
-
 
101
      {
-
 
102
        test: /(js|jsx)$/,
-
 
103
        use: ["babel-loader"],
-
 
104
        exclude: /node_modules/,
-
 
105
      },
-
 
106
      {
-
 
107
        test: /\.css$/i,
-
 
108
        use: [MiniCssExtractPlugin.loader, "css-loader"],
-
 
109
      },
-
 
110
      {
-
 
111
        test: /\.module\.s(a|c)ss$/,
-
 
112
        use: [
-
 
113
          MiniCssExtractPlugin.loader,
-
 
114
          {
-
 
115
            loader: "css-loader",
-
 
116
            options: {
-
 
117
              modules: {
-
 
118
                localIdentName: "[local]--[hash:base64:5]",
-
 
119
              },
-
 
120
              sourceMap: isDevelopment,
-
 
121
            },
-
 
122
          },
-
 
123
          {
-
 
124
            loader: "sass-loader",
-
 
125
            options: {
-
 
126
              sourceMap: isDevelopment,
-
 
127
            },
-
 
128
          },
-
 
129
        ],
-
 
130
      },
-
 
131
      {
-
 
132
        test: /\.s(a|c)ss$/,
-
 
133
        exclude: /\.module.(s(a|c)ss)$/,
-
 
134
        use: [
-
 
135
          MiniCssExtractPlugin.loader,
-
 
136
          "css-loader",
-
 
137
          {
-
 
138
            loader: "sass-loader",
-
 
139
            options: {
-
 
140
              sourceMap: isDevelopment,
-
 
141
            },
-
 
142
          },
-
 
143
        ],
-
 
144
      },
-
 
145
    ],
-
 
146
  },
-
 
147
  plugins: [
-
 
148
    new MiniCssExtractPlugin({
-
 
149
      filename: "[name].css",
-
 
150
      chunkFilename: "[id].css",
-
 
151
    }),
-
 
152
  ],
-
 
153
  optimization: {
-
 
154
    minimizer: [
-
 
155
      new TerserPlugin({
-
 
156
        extractComments: false,
-
 
157
      }),
-
 
158
    ],
86
const currentPath = paths.recruitment_and_selection_interviews
-
 
87
 
-
 
88
module.exports = {
-
 
89
	entry: currentPath.entry,
-
 
90
	output: {
-
 
91
		path: currentPath.output,
-
 
92
		filename: currentPath.filename,
-
 
93
	},
-
 
94
	watch: isDevelopment ? true : false,
-
 
95
	mode: isDevelopment ? 'development' : 'production',
-
 
96
	resolve: {
-
 
97
		extensions: ['.js', '.jsx', '.scss'],
-
 
98
	},
-
 
99
	module: {
-
 
100
		rules: [
-
 
101
			{
-
 
102
				test: /(js|jsx)$/,
-
 
103
				use: ['babel-loader'],
-
 
104
				exclude: /node_modules/,
-
 
105
			},
-
 
106
			{
-
 
107
				test: /\.css$/i,
-
 
108
				use: [MiniCssExtractPlugin.loader, 'css-loader'],
-
 
109
			},
-
 
110
			{
-
 
111
				test: /\.module\.s(a|c)ss$/,
-
 
112
				use: [
-
 
113
					MiniCssExtractPlugin.loader,
-
 
114
					{
-
 
115
						loader: 'css-loader',
-
 
116
						options: {
-
 
117
							modules: {
-
 
118
								localIdentName: '[local]--[hash:base64:5]',
-
 
119
							},
-
 
120
							sourceMap: isDevelopment,
-
 
121
						},
-
 
122
					},
-
 
123
					{
-
 
124
						loader: 'sass-loader',
-
 
125
						options: {
-
 
126
							sourceMap: isDevelopment,
-
 
127
						},
-
 
128
					},
-
 
129
				],
-
 
130
			},
-
 
131
			{
-
 
132
				test: /\.s(a|c)ss$/,
-
 
133
				exclude: /\.module.(s(a|c)ss)$/,
-
 
134
				use: [
-
 
135
					MiniCssExtractPlugin.loader,
-
 
136
					'css-loader',
-
 
137
					{
-
 
138
						loader: 'sass-loader',
-
 
139
						options: {
-
 
140
							sourceMap: isDevelopment,
-
 
141
						},
-
 
142
					},
-
 
143
				],
-
 
144
			},
-
 
145
		],
-
 
146
	},
-
 
147
	plugins: [
-
 
148
		new MiniCssExtractPlugin({
-
 
149
			filename: '[name].css',
-
 
150
			chunkFilename: '[id].css',
-
 
151
		}),
-
 
152
	],
-
 
153
	optimization: {
-
 
154
		minimizer: [
-
 
155
			new TerserPlugin({
-
 
156
				extractComments: false,
-
 
157
			}),
-
 
158
		],
159
  },
159
	},