1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-25 11:33:35 +03:00
tabby/app/webpack.main.config.js
Eugene Pankov 9cdcc8d8e5 fixed #649
2019-02-09 22:10:42 +01:00

51 lines
1.3 KiB
JavaScript

const path = require('path')
const webpack = require('webpack')
module.exports = {
name: 'terminus-main',
target: 'node',
entry: {
main: path.resolve(__dirname, 'lib/index.ts'),
},
mode: process.env.TERMINUS_DEV ? 'development' : 'production',
context: __dirname,
devtool: 'source-map',
output: {
path: path.join(__dirname, 'dist'),
pathinfo: true,
filename: '[name].js',
},
resolve: {
modules: ['lib/', 'node_modules', '../node_modules'].map(x => path.join(__dirname, x)),
extensions: ['.ts', '.js'],
},
module: {
rules: [
{
test: /\.ts$/,
use: {
loader: 'awesome-typescript-loader',
options: {
configFileName: path.resolve(__dirname, 'tsconfig.main.json'),
},
},
},
],
},
externals: {
electron: 'commonjs electron',
'electron-config': 'commonjs electron-config',
'electron-vibrancy': 'commonjs electron-vibrancy',
'electron-squirrel-startup': 'commonjs electron-squirrel-startup',
fs: 'commonjs fs',
mz: 'commonjs mz',
path: 'commonjs path',
yargs: 'commonjs yargs',
'windows-swca': 'commonjs windows-swca',
'windows-blurbehind': 'commonjs windows-blurbehind',
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
],
}