mattermost-desktop/webpack.config.main.js
Devin Binnie e56b5cdd6a
Various build and developer fixes, some optimizations (#2975)
* Various build and developer fixes, some optimizations

* Fix the linux build

* Fix afterpack

* Fix notarization variables

* Revert macos-notification-state changes from this PR

* Only build the tar for PRs

* Also ci

* Fix copy script

* Fix copy script more

* Remove @babel/cli

* Fix windows build

* Fix MAS build
2024-03-12 10:04:11 -04:00

47 lines
1.1 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',
},
externals: {
'macos-notification-state': 'require("macos-notification-state")',
'windows-focus-assist': 'require("windows-focus-assist")',
},
externalsPresets: {
electronMain: true,
},
module: {
rules: [{
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 */