mattermost-desktop/webpack.config.main.js
Devin Binnie 9b36c25e4e
[MM-52696] Upgrade and clean up Desktop App dev dependencies (#2970)
* Upgrade to ESLint v8

* Upgrade TypeScript, api-types, react-intl

* Remove unnecessary dependencies

* Update to React 17.0.2

* npm audit fixes, remove storybook

* Lock some packages

* Remove nan patch

* Remove some deprecated dependencies

* Fix lint/type/tests

* Merge'd

* Fix bad use of spawn

* Fix notarize

* Fix afterpack, switch to tsc es2020

* Fix api types

* Use @mattermost/eslint-plugin
2024-03-07 15:55:33 -05:00

58 lines
1.5 KiB
JavaScript

// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// Copyright (c) 2015-2016 Yuya Ochiai
// This files uses CommonJS.
/* eslint-disable import/no-commonjs */
'use strict';
const CopyPlugin = require('copy-webpack-plugin');
const {merge} = require('webpack-merge');
const base = require('./webpack.config.base');
module.exports = merge(base, {
entry: {
index: './src/main/app/index.ts',
internalAPI: './src/main/preload/internalAPI.js',
externalAPI: './src/main/preload/externalAPI.ts',
},
externals: {
'macos-notification-state': 'require("macos-notification-state")',
'windows-focus-assist': 'require("windows-focus-assist")',
},
module: {
rules: [{
test: /\.(js|ts)?$/,
use: {
loader: 'babel-loader',
options: {
include: ['@babel/plugin-proposal-class-properties'],
},
},
}, {
test: /\.mp3$/,
type: 'asset/inline',
},
{
test: /\.node$/,
loader: 'node-loader',
}],
},
plugins: [
new CopyPlugin({
patterns: [{
from: 'assets/**/*',
context: 'src',
}],
}),
],
node: {
__filename: true,
__dirname: true,
},
target: 'electron-main',
});
/* eslint-enable import/no-commonjs */