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
This commit is contained in:
Devin Binnie
2024-03-12 10:04:11 -04:00
committed by GitHub
parent e5efa727fe
commit e56b5cdd6a
36 changed files with 921 additions and 3761 deletions

View File

@@ -14,8 +14,6 @@ const {merge} = require('webpack-merge');
const base = require('./webpack.config.base');
const WEBSERVER_PORT = process.env.WEBSERVER_PORT ?? 9065;
module.exports = merge(base, {
entry: {
index: './src/renderer/index.tsx',
@@ -38,6 +36,11 @@ module.exports = merge(base, {
filename: '[name]_bundle.js',
assetModuleFilename: '[name].[ext]',
},
optimization: {
splitChunks: {
chunks: 'all',
},
},
plugins: [
new HtmlWebpackPlugin({
title: 'Mattermost Desktop App',
@@ -131,11 +134,6 @@ module.exports = merge(base, {
],
module: {
rules: [{
test: /\.(js|jsx|ts|tsx)?$/,
use: {
loader: 'babel-loader',
},
}, {
test: /\.css$/,
exclude: /\.lazy\.css$/,
use: [
@@ -175,10 +173,7 @@ module.exports = merge(base, {
__filename: false,
__dirname: false,
},
target: 'electron-renderer',
devServer: {
port: WEBSERVER_PORT,
},
target: 'web',
});
/* eslint-enable import/no-commonjs */