-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
38 lines (36 loc) · 1.09 KB
/
webpack.config.js
File metadata and controls
38 lines (36 loc) · 1.09 KB
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
'use strict';
var webpack = require('webpack');
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
var path = require('path');
var APP = path.join(__dirname, '/app'); ;
module.exports = {
context: APP,
entry: './index.ts',
output: {
filename: 'bundle.js',
path: 'dist'
},
devtool: 'inline-source-map',
resolve: {
extensions: ['', '.ts', '.js']
},
resolveLoader: {
root: path.join(__dirname, '/node_modules')
},
plugins: [
new BrowserSyncPlugin({
host: 'localhost',
port: 8082,
proxy: 'http://localhost:8080/'
})
],
module: {
loaders: [
{ test: /\.ts$/, loader: 'ts-loader'},
{ test: /\.css$/, loader: "style-loader!css-loader" },
{ test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&minetype=application/font-woff" },
{ test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" },
{ test: /\.html$/, exclude: /node_modules/, loader: 'raw' }
]
}
};