-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
executable file
·50 lines (49 loc) · 1.83 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
let webpack = require('webpack')
module.exports = [
{
entry: {generator: './src/graph/generator.ts'},
resolve: {extensions: ['.ts', '.tsx', '.js']},
devtool: 'source-map',
module: {
loaders: [
{test: /\.tsx?$/, loader: 'tslint-loader'},
{test: /\.progred$/, loader: 'json-loader'},
{test: /\.tsx?$/, loader: 'ts-loader'} ]},
target: 'node',
output: {
path: `${__dirname}/build`,
devtoolModuleFilenameTemplate: '[absolute-resource-path]',
devtoolFallbackModuleFilenameTemplate: '[absolute-resource-path]?[hash]',
filename: 'generator.js' }},
{
entry: { main: './src/electron/main.ts' },
resolve: {extensions: ['.ts', '.tsx', '.js']},
devtool: 'source-map',
module: {
loaders: [
{test: /\.tsx?$/, loader: 'tslint-loader'},
{test: /\.progred$/, loader: 'json-loader'},
{test: /\.tsx?$/, loader: 'ts-loader'} ]},
target: 'electron',
node: { __dirname: false },
output: {
path: `${__dirname}/build`,
devtoolModuleFilenameTemplate: '[absolute-resource-path]',
devtoolFallbackModuleFilenameTemplate: '[absolute-resource-path]?[hash]',
filename: 'main.js' }},
{
entry: { main: './src/graph/graphEditor.tsx' },
target: 'electron',
resolve: {extensions: ['.ts', '.tsx', '.js']},
devtool: 'source-map',
plugins: [new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' })],
module: {
loaders: [
{test: /\.tsx?$/, loader: 'tslint-loader'},
{test: /\.progred$/, loader: 'json-loader'},
{test: /\.tsx?$/, loader: 'ts-loader'} ]},
output: {
path: `${__dirname}/build`,
devtoolModuleFilenameTemplate: '[absolute-resource-path]',
devtoolFallbackModuleFilenameTemplate: '[absolute-resource-path]?[hash]',
filename: 'grapheditor3.js' }}]