Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15801 Rev 16285
Línea 3... Línea 3...
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
Línea 180... Línea 154...
180
};
154
}
181
 
155
 
Línea 182... Línea 156...
182
// change active path here
156
// change active path here
183
const currentPath = paths.mobileChat;
157
const currentPath = paths.mobileChat;
184
 
158
 
185
module.exports = {
159
module.exports = {
186
  entry: currentPath.entry,
160
	entry: currentPath.entry,
187
  output: {
161
	output: {
188
    path: currentPath.output,
162
		path: currentPath.output,
189
    filename: currentPath.filename,
163
		filename: currentPath.filename,
190
  },
164
	},
191
  watch: isDevelopment ? true : false,
165
	watch: isDevelopment ? true : false,
192
  mode: isDevelopment ? "development" : "production",
166
	mode: isDevelopment ? 'development' : 'production',
193
  resolve: {
167
	resolve: {
194
    extensions: [".js", ".jsx", ".scss"],
168
		extensions: ['.js', '.jsx', '.scss'],
195
  },
169
	},
196
  module: {
170
	module: {
197
    rules: [
171
		rules: [
198
      {
172
			{
199
        test: /(js|jsx)$/,
173
				test: /(js|jsx)$/,
200
        use: ["babel-loader"],
174
				use: ['babel-loader'],
201
        exclude: /node_modules/,
175
				exclude: /node_modules/,
202
      },
176
			},
203
      {
177
			{
204
        test: /\.css$/i,
178
				test: /\.css$/i,
205
        use: [MiniCssExtractPlugin.loader, "css-loader"],
179
				use: [MiniCssExtractPlugin.loader, 'css-loader'],
206
      },
180
			},
207
      {
181
			{
208
        test: /\.module\.s(a|c)ss$/,
182
				test: /\.module\.s(a|c)ss$/,
209
        use: [
183
				use: [
210
          MiniCssExtractPlugin.loader,
184
					MiniCssExtractPlugin.loader,
211
          {
185
					{
212
            loader: "css-loader",
186
						loader: 'css-loader',
213
            options: {
187
						options: {
214
              modules: {
188
							modules: {
215
                localIdentName: "[local]--[hash:base64:5]",
189
								localIdentName: '[local]--[hash:base64:5]',
216
              },
190
							},
217
              sourceMap: isDevelopment,
191
							sourceMap: isDevelopment,
218
            },
192
						},
219
          },
193
					},
220
          {
194
					{
221
            loader: "sass-loader",
195
						loader: 'sass-loader',
222
            options: {
196
						options: {
223
              sourceMap: isDevelopment,
197
							sourceMap: isDevelopment,
224
            },
198
						},
225
          },
199
					},
226
        ],
200
				],
227
      },
201
			},
228
      {
202
			{
229
        test: /\.s(a|c)ss$/,
203
				test: /\.s(a|c)ss$/,
230
        exclude: /\.module.(s(a|c)ss)$/,
204
				exclude: /\.module.(s(a|c)ss)$/,
231
        use: [
205
				use: [
232
          MiniCssExtractPlugin.loader,
206
					MiniCssExtractPlugin.loader,
233
          "css-loader",
207
					'css-loader',
234
          {
208
					{
235
            loader: "sass-loader",
209
						loader: 'sass-loader',
236
            options: {
210
						options: {
237
              sourceMap: isDevelopment,
211
							sourceMap: isDevelopment,
238
            },
212
						},
239
          },
213
					},
240
        ],
214
				],
241
      },
215
			},
242
    ],
216
		],
243
  },
217
	},
244
  plugins: [
218
	plugins: [
245
    new MiniCssExtractPlugin({
219
		new MiniCssExtractPlugin({
246
      filename: "[name].css",
220
			filename: '[name].css',
247
      chunkFilename: "[id].css",
221
			chunkFilename: '[id].css',
248
    }),
222
		}),
249
  ],
223
	],
250
  optimization: {
224
	optimization: {
251
    minimizer: [
225
		minimizer: [
252
      new TerserPlugin({
226
			new TerserPlugin({
253
        extractComments: false,
227
				extractComments: false,
254
      }),
228
			}),