mirror of
https://github.com/Shopify/draggable.git
synced 2025-12-08 20:15:56 +00:00
36 lines
727 B
JavaScript
36 lines
727 B
JavaScript
/* 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
|
|
},
|
|
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 */
|