forked from Shopify/draggable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
41 lines (37 loc) · 815 Bytes
/
webpack.config.js
File metadata and controls
41 lines (37 loc) · 815 Bytes
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
/* eslint-disable */
const webpack = require('webpack');
const target = '/lib/';
function createConfig({name, filename = name, source, path = ''}) {
return {
entry: `./src/${source}`,
output: {
path: __dirname + target + path,
filename: `${filename}.js`,
library: name,
libraryTarget: 'umd',
umdNamedDefine: true
},
resolve: {
modules: [
'node_modules',
'src/',
],
},
module: {
loaders: [
{
test: /(\.jsx|\.js)$/,
loader: 'babel-loader',
exclude: /node_modules/,
options: {
presets: ["shopify/web"]
}
}
]
}
};
}
module.exports = [
createConfig({name: 'Draggable', filename: 'draggable', source: 'index'}),
];
/* eslint-enable */