-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.js
35 lines (32 loc) · 885 Bytes
/
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
const merge = require('webpack-merge');
const common = require('./webpack.config.js');
const path = require('path');
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
module.exports = merge(common, {
mode : 'development',
devtool : 'source-map',
watch : true,
devServer: {
// hot: true,
contentBase: path.resolve(__dirname, "dist")
} ,
entry: {
'js-components.js': './src/main.js',
'/css/todo.css': './assets/sass/todo.scss'
},
output: {
path: path.resolve(__dirname, "dist"),
filename: '[name]',
publicPath: "./dist/"
},
plugins : [
new BrowserSyncPlugin({
// browse to http://localhost:3000/ during development,
// ./public directory is being served
host: 'localhost',
port: 3000,
files:['./dist/*.html'],
server: { baseDir: ['dist'] }
}),
]
});