forked from rubyfleener/sgfwebdevfest2018
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.horse.js
47 lines (46 loc) · 1.28 KB
/
webpack.horse.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
const path = require('path');
const BrowserSyncPlugin = require('browser-sync-webpack-plugin');
module.exports = {
mode: 'development',
entry: { styles: './assets/sass/styles.scss' },
output: {
path: path.resolve(__dirname, "wwwroot"),
filename: "horse.js",
publicPath: "/"
},
devtool: "source-map",
module: {
rules: [{
test: /\.scss$/,
use: [{
loader: 'style-loader'
}, {
loader: "css-loader", options: {
sourceMap: true,
minimize: true
}
}, {
loader: "sass-loader", options: {
sourceMap: true,
minimize: true
}
}]
}],
},
plugins: [
new BrowserSyncPlugin({
proxy: 'https://localhost:5001',
files: [
// 'wwwroot/css/styles.css',
// 'wwwroot/js/site.js',
'Pages/**/*.cshtml',
'Views/**/*.cshtml',
]
},
{
// prevent BrowserSync from reloading the page
// and let Webpack Dev Server take care of this
reload: false
})
]
};