-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
55 lines (53 loc) · 1.64 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
51
52
53
54
55
'use strict';
const webpack = require('webpack');
const path = require('path');
module.exports = {
context: path.join(__dirname, 'src/main'),
entry: './javascripts/main.tsx',
output: {
path: path.join(__dirname, 'src/main/resources/static/build'),
publicPath: '/static/build/',
filename: 'bundle.js'
},
resolve: {
// Add `.ts` and `.tsx` as a resolvable extension.
extensions: ['.ts', '.tsx', '.js']
},
module: {
loaders: [
{
test: /\.tsx?$/,
enforce: 'pre',
loader: 'tslint-loader',
options: {
emitErrors: true,
failOnHint: true
}
},
{
test: /\.tsx?$/,
loader: ['babel-loader?presets[]=env', 'ts-loader']
},
{
test: /\.scss$/,
loader: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader']
}
]
},
devServer: {
port: 9090,
contentBase: [ './src/main/resources/templates' ],
watchContentBase: true,
proxy: {
'**': {
target: 'http://localhost:8080',
secure: false,
// <a href='https://github.com/nodejitsu/node-http-proxy'>node-http-proxy</a> option - don't add /localhost:8080/ to proxied request paths
prependPath: false
}
},
publicPath: 'http://localhost:9090/static/build/',
},
plugins: [ ],
devtool: 'source-map'
};