checkout/config/prepare-output-config.js

14 lines
469 B
JavaScript
Raw Normal View History

const helpers = require('./helpers');
2018-12-20 08:56:59 +00:00
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const prepareOutputConfig = (outputPath, jsFilenamePattern = '[name]', cssFilenamePattern = '[name]') => ({
output: {
filename: `${jsFilenamePattern}.js`,
path: helpers.root(outputPath),
2018-02-15 12:30:54 +00:00
publicPath: './'
},
2018-12-20 08:56:59 +00:00
plugins: [new MiniCssExtractPlugin({ filename: `${cssFilenamePattern}.css` })]
});
module.exports = prepareOutputConfig;