ucap-lg-desktop/config/webpack.config.js

38 lines
836 B
JavaScript
Raw Normal View History

2020-03-27 08:45:48 +00:00
const path = require('path');
const webpackNodeExternals = require('webpack-node-externals');
const rootPath = path.join(__dirname, '..');
module.exports = [
{
mode: process.env.ENV || 'development',
entry: path.join(rootPath, 'src', 'main'),
target: 'electron-main',
devtool: 'source-map',
externals: [webpackNodeExternals()],
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
use: [
{
loader: 'ts-loader',
options: {
configFile: path.join(rootPath, 'tsconfig.app.json')
}
}
],
exclude: /node_modules/
}
]
},
output: {
path: path.join(rootPath, 'dist'),
filename: 'electron-main.js'
}
}
];