-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.js
63 lines (59 loc) · 1.51 KB
/
webpack.dev.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
56
57
58
59
60
61
62
63
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var FaviconsWebpackPlugin = require('favicons-webpack-plugin')
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
module.exports = {
entry: './src/index.js',
mode: "development",
devtool: 'eval-source-map',
devServer: {
inline: true,
port: 9000,
open: true,
lazy: false
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
}
},
{
test: /\.png$/,
exclude: /node_modules/,
use: [{
loader: 'image-webpack-loader'
},
{
loader: "url-loader"
}]
},
{
test: /\.scss$/,
use: [
{ loader: "style-loader" },
{ loader: "css-loader" },
{ loader: "sass-loader" }
]
},
]
},
plugins: [
new HtmlWebpackPlugin({
title: 'Air Traffic FE',
template: 'resources/ejs/index-dev.ejs'
}),
new FaviconsWebpackPlugin('./resources/assets/img/octopod.png'),
new BrowserSyncPlugin({
host: 'localhost',
port: 3000,
proxy: 'http://localhost:9000/'
},
{
reload: false
})
]
};