forked from quri/react-bootstrap-datetimepicker
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.dev.config.js
More file actions
53 lines (47 loc) · 1.28 KB
/
webpack.dev.config.js
File metadata and controls
53 lines (47 loc) · 1.28 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: [
'webpack-dev-server/client?http://0.0.0.0:8080', // WebpackDevServer host and port
'webpack/hot/only-dev-server', // 'only' prevents reload on syntax errors
'./dev/index.js'
],
output: {
path: path.join(__dirname, '/dev'),
filename: 'example-app.js',
chunkFilename: '[id].chunk.js',
sourceMapFilename: 'example-app.map',
assetPath: '/'
},
resolve: {
alias: {
'datetimepicker': '../src/DateTimeField'
},
extensions: ['', '.js']
},
module: {
loaders: [
{
test: /\.js?$/,
exclude: /node_modules/,
loaders: [ 'react-hot' ,'babel-loader' ]
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract(
'style', 'css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
)
},
]
},
devtool: 'eval-source-map',
plugins: [
new webpack.HotModuleReplacementPlugin(),
new ExtractTextPlugin('styles.css', { allChunks: true }),
new HtmlWebpackPlugin({
template: path.join(__dirname, '/dev/index.html')
})
]
};