-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathwebpack.config.js
38 lines (36 loc) · 1001 Bytes
/
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
var webpack = require('webpack');
var path = require('path');
var libraryName = 'DoubleScrollbar';
var outputFile = libraryName + '.js';
var config = {
entry: path.resolve(__dirname, 'src/DoubleScrollbar.jsx'),
devtool: 'source-map',
output: {
path: path.resolve(__dirname, 'dist'),
filename: outputFile,
library: libraryName,
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
loaders: [{
test: /\.jsx?$/, // A regexp to test the require path. accepts either js or jsx
loader: 'babel', // The module to load. "babel" is short for "babel-loader"
exclude: /node_modules/
},
{
test: /(\.jsx|\.js)$/,
loader: "eslint-loader",
exclude: /node_modules/
}
]
},
resolve: {
root: path.resolve('./src'),
extensions: ['', '.js', 'jsx']
},
externals: {
'react': 'react'
}
};
module.exports = config;