forked from ZestfulNation/vue-hotel-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.conf.js
42 lines (35 loc) · 928 Bytes
/
webpack.dev.conf.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
const config = require('./webpack.base.conf')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const webpack = require('webpack')
const path = require('path')
config.devtool = '#eval-source-map'
config.devServer = {
host: 'localhost',
port: 1805,
historyApiFallback: true,
hotOnly: true,
overlay: true,
noInfo: true,
}
config.module.rules = (config.module.rules || []).concat([
{
test: /\.css$/,
use: [
{ loader: 'style-loader' },
{ loader: 'css-loader' },
],
},
])
config.plugins = (config.plugins || []).concat([
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
}),
new HtmlWebpackPlugin({
title: 'BookUp',
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.html'),
}),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
])
module.exports = config