Seperate electron and web target building
This commit is contained in:
committed by
József Farkas
parent
517aed1b1c
commit
983eb72892
32
electron/src/webpack.config.electron-main.js
Normal file
32
electron/src/webpack.config.electron-main.js
Normal 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: [ path.resolve(rootDir, 'src/electron-main.ts')],
|
||||
output: {
|
||||
path: rootDir + "/dist",
|
||||
filename: "electron-main.js"
|
||||
},
|
||||
target: 'electron-main',
|
||||
devtool: 'source-map',
|
||||
resolve: {
|
||||
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js'],
|
||||
modules: [path.join(rootDir, "node_modules")]
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.ts$/, loader: 'ts-loader?' + JSON.stringify({ configFileName: 'tsconfig-electron-main.json' }), exclude: /node_modules/ },
|
||||
]},
|
||||
plugins: [
|
||||
// new webpack.optimize.UglifyJsPlugin({ minimize: true })
|
||||
webpackFailPlugin
|
||||
],
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user