mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-30 03:23:51 -05:00
46 lines
1015 B
JavaScript
46 lines
1015 B
JavaScript
const path = require('path');
|
|
|
|
const webpack = require('webpack');
|
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
|
|
const browser = require('./webpack.browser.config');
|
|
|
|
/** @type {webpack.Configuration} */
|
|
module.exports = {
|
|
...browser,
|
|
target: 'node',
|
|
devtool: 'source-map',
|
|
output: {
|
|
path: path.resolve(path.join(__dirname, '/../lib-dist')),
|
|
filename: 'bundle.desktop.js',
|
|
sourceMapFilename: 'bundle.desktop.js.map',
|
|
libraryTarget: 'commonjs2',
|
|
},
|
|
resolve: {
|
|
extensions: [
|
|
'.electron.js',
|
|
'.electron.ts',
|
|
'.electron.tsx',
|
|
'.js',
|
|
'.ts',
|
|
'.tsx',
|
|
'.json',
|
|
'pegjs',
|
|
],
|
|
},
|
|
externals: ['better-sqlite3', 'electron-log', 'node-fetch', 'node-libofx'],
|
|
plugins: [
|
|
new webpack.IgnorePlugin({
|
|
resourceRegExp: /original-fs/,
|
|
}),
|
|
new BundleAnalyzerPlugin({
|
|
analyzerMode: 'disabled',
|
|
generateStatsFile: true,
|
|
}),
|
|
],
|
|
node: {
|
|
__dirname: false,
|
|
__filename: false,
|
|
},
|
|
};
|