forked from namespace-ee/react-calendar-timeline
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
49 lines (48 loc) · 1.1 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
var webpack = require('webpack')
var path = require('path')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = {
context: __dirname,
entry: {
'react-calendar-timeline': './src/index.js'
},
output: {
path: path.join(__dirname, 'build/dist/'),
filename: '[name].js',
publicPath: 'build/dist/',
library: 'ReactCalendarTimeline',
libraryTarget: 'umd'
},
debug: true,
devtool: 'sourcemap',
module: {
loaders: [
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader!sass-loader')
},
{
test: /\.(js|jsx)$/,
loaders: ['babel'],
exclude: /node_modules/
}
]
},
plugins: [
new webpack.NoErrorsPlugin(),
new ExtractTextPlugin('[name].css')
],
externals: {
'react': 'React',
'react-dom': 'ReactDOM',
'moment': 'moment',
'interact.js': 'interact'
},
resolve: {
extensions: ['', '.js', '.jsx', '.scss', '.md']
}
}