-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
43 lines (36 loc) · 1.08 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
var CopyWebpackPlugin = require('copy-webpack-plugin')
var webpack = require('webpack')
module.exports = {
devServer: {
contentBase: [ './dist', './src' ]
},
entry: [
'webpack-dev-server/client?http://localhost:8080/',
'webpack/hot/only-dev-server',
'./src/routes.tsx'
],
module: {
loaders: [
{ test: /\.tsx?$/, loaders: [ 'react-hot', 'ts-loader' ] }
]
},
output: {
filename: 'bundle.js',
path: './dist',
publicPath: '/dist/'
},
plugins: [
new CopyWebpackPlugin([
{ from: './node_modules/jquery/dist/jquery.min.js' },
{ from: './src/assets/yahoo.png', to: "assets/yahoo.png" },
{ from: './src/assets/bitcoin.png', to: "assets/bitcoin.png" },
{ from: './src/assets/icon.png', to: "assets/icon.png" }
]),
new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin(/vertx/)
],
resolve: {
extensions: [ '', '.js', '.jsx', '.ts', '.tsx' ]
},
target: 'electron'
}