@nurun-sf/spark-component
Version:
A tool for building spark components
20 lines (16 loc) • 479 B
JavaScript
;
const path = require('path');
const config = require('./config');
module.exports = function getSimpleWebpackOptions(filepath) {
// Get the name without an underscore.
var outputName = path.basename(filepath).replace('_', '');
return {
watch: config.watch,
entry: path.join(process.cwd(), filepath),
output: {
path: path.dirname(filepath),
filename: outputName,
},
module: { loaders: config.webpack.module.loaders },
};
};