forked from namespace-ee/react-calendar-timeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
54 lines (51 loc) · 1.2 KB
/
webpack.config.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
const path = require('path')
const port = process.env.PORT || 8888
const config = {
devtool: 'cheap-eval-source-map',
context: path.join(__dirname, './demo'),
entry: {
// vendor: ['react', 'react-dom', 'faker', 'interactjs', 'moment'],
demo: [
`webpack-dev-server/client?http://0.0.0.0:${port}`,
'webpack/hot/only-dev-server',
'./index.js'
]
},
output: {
path: path.join(__dirname, './build'),
publicPath: '',
chunkFilename: '[name].bundle.js',
filename: '[name].bundle.js'
},
mode: 'development',
module: {
rules: [
{
test: /\.scss$/,
loader: 'style-loader!css-loader!sass-loader'
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
loaders: ['babel-loader']
}
]
},
resolve: {
extensions: ['.js', '.jsx'],
modules: [path.resolve('./demo'), 'node_modules'],
alias: {
'~': path.join(__dirname, './demo'),
'react-calendar-timeline': path.join(__dirname, './src'),
'react-calendar-timeline-css': path.join(
__dirname,
'./src/lib/Timeline.scss'
)
}
},
devServer: {
contentBase: './demo',
port
}
}
module.exports = config