forked from dillonkearns/mobster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.ts
36 lines (35 loc) · 861 Bytes
/
webpack.config.ts
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
import * as webpack from 'webpack'
import * as path from 'path'
export default function(env: any): webpack.Configuration {
return {
entry: {
setup: './typescript/setup.ts',
timer: './typescript/timer.ts'
},
target: 'electron-renderer',
output: {
path: path.resolve(__dirname),
filename: '[name].bundle.js',
publicPath: '/'
},
module: {
loaders: [
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: [
{ loader: 'elm-hot-loader' },
{
loader: 'elm-webpack-loader',
options: env && env.production ? {} : { debug: false, warn: true }
}
]
},
{ test: /\.ts$/, loader: 'ts-loader' }
]
},
resolve: {
extensions: ['.js', '.ts', '.elm']
}
}
}