Make node integration work in electron

This commit is contained in:
Farkas József
2016-12-18 14:53:40 +01:00
parent 4ba7d712e5
commit 3cc5077f13
5 changed files with 48 additions and 11 deletions

View File

@@ -0,0 +1,32 @@
//var webpack = require("webpack");
var webpackFailPlugin = require('webpack-fail-plugin');
var path = require('path');
var rootDir = path.resolve(__dirname, '../');
module.exports = {
entry: ['./src/electron-main.ts'],
output: {
path: rootDir + "/dist",
filename: "electron-main.js"
},
target: 'electron',
devtool: 'source-map',
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'],
modules: [path.join(rootDir, "node_modules")]
},
module: {
loaders: [
{ test: /\.ts$/, loader: 'ts-loader', exclude: /node_modules/ },
]},
plugins: [
// new webpack.optimize.UglifyJsPlugin({ minimize: true })
webpackFailPlugin
],
node: {
__dirname: false,
__filename: false
}
}