1e35a97f33
* [MM-36326] Added Native Node Module support - incl demo to fix DND issue * Fix OS per build * Fix to include priority alarms on Windows * Update node command * Fixes for mac (only work on non-MAS build) * Attempt to rebuild properly since electron-builder is having issues with a module * Show me more logs maybe idk * Try with ignore-scripts * Force async to work asyncly * PR feedback and ESLint fixes * Add comment for node-gyp * Revert me: test msi and mac installer * Revert me too * Try reverting back to the old system cause the new one miraculously broke... * Add ignore scripts to makefile * Ignore non-macho files :P * Revert "Revert me too" This reverts commit 074dc9551a2d8ce34a23a3abaeed937d957e8b76. * Revert "Revert me: test msi and mac installer" This reverts commit 0ac998c26a824e7136bdfdc825280a407bb1aa7f.
63 lines
1.7 KiB
JavaScript
63 lines
1.7 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 {merge} = require('webpack-merge');
|
|
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
|
|
const base = require('./webpack.config.base');
|
|
|
|
module.exports = merge(base, {
|
|
entry: {
|
|
index: './src/main/app/index.ts',
|
|
mainWindow: './src/main/preload/mainWindow.js',
|
|
dropdown: './src/main/preload/dropdown.js',
|
|
preload: './src/main/preload/mattermost.js',
|
|
modalPreload: './src/main/preload/modalPreload.js',
|
|
loadingScreenPreload: './src/main/preload/loadingScreenPreload.js',
|
|
urlView: './src/main/preload/urlView.js',
|
|
},
|
|
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 */
|