-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwebpack.config.js
41 lines (37 loc) · 1.04 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
/* jshint node: true */
var path = require('path');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
context: path.join(__dirname),
entry: ['babel-plugin-transform-object-assign', './lib/index.js'],
output: {
path: path.join(__dirname) + '/dist',
filename: 'rdpicker.js',
libraryTarget: 'umd',
library: 'Rdpicker'
},
externals: {
'react': 'var React',
'react-dom': 'var ReactDOM',
'react/addons': 'var React',
'moment': 'var moment'
},
module: {
loaders: [
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader")
},
{
test: /\.cjsx$/,
exclude: /(node_modules|bower_components)/,
loaders: ["babel?plugins=transform-object-assign", "coffee", "cjsx"],
},
{ test: /\.coffee$/, loader: "coffee-loader"}
]
},
// Use the plugin to specify the resulting filename (and add needed behavior to the compiler)
plugins: [
new ExtractTextPlugin("rdpicker.css")
]
};