1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-21 01:21:52 +03:00
tabby/app/webpack.main.config.js

50 lines
1.2 KiB
JavaScript
Raw Normal View History

const path = require('path')
const webpack = require('webpack')
module.exports = {
name: 'terminus-main',
target: 'node',
entry: {
main: path.resolve(__dirname, 'lib/index.ts'),
},
2019-02-10 00:10:42 +03:00
mode: process.env.TERMINUS_DEV ? 'development' : 'production',
context: __dirname,
2019-04-28 12:42:34 +03:00
devtool: 'eval-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',
fs: 'commonjs fs',
mz: 'commonjs mz',
path: 'commonjs path',
yargs: 'commonjs yargs',
'windows-swca': 'commonjs windows-swca',
2019-05-06 15:09:30 +03:00
'windows-blurbehind': 'commonjs windows-blurbehind',
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
],
}