checkout/config/prepare-output-config.js
2018-12-20 11:56:59 +03:00

14 lines
469 B
JavaScript

const helpers = require('./helpers');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const prepareOutputConfig = (outputPath, jsFilenamePattern = '[name]', cssFilenamePattern = '[name]') => ({
output: {
filename: `${jsFilenamePattern}.js`,
path: helpers.root(outputPath),
publicPath: './'
},
plugins: [new MiniCssExtractPlugin({ filename: `${cssFilenamePattern}.css` })]
});
module.exports = prepareOutputConfig;