mattermost-desktop/webpack.config.base.js

25 lines
745 B
JavaScript
Raw Normal View History

2018-05-30 08:23:57 -07:00
// Copyright (c) 2015-2016 Yuya Ochiai
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
2019-03-12 07:31:45 -07:00
// This file uses CommonJS.
2018-04-10 05:13:34 -07:00
/* eslint-disable import/no-commonjs */
2016-10-12 08:08:04 -07:00
'use strict';
2018-05-25 07:12:52 -07:00
const webpack = require('webpack');
2016-10-12 08:08:04 -07:00
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
2018-05-25 07:12:52 -07:00
// Some plugins cause errors on the app, so use few plugins.
// https://webpack.js.org/concepts/mode/#mode-production
mode: isProduction ? 'none' : 'development',
plugins: isProduction ? [
new webpack.DefinePlugin({'process.env.NODE_ENV': JSON.stringify('production')}),
] : [],
devtool: isProduction ? false : '#inline-source-map',
2016-10-12 08:08:04 -07:00
};
2019-03-12 07:31:45 -07:00
/* eslint-enable import/no-commonjs */