checkout/config/prepare-output-config.js
2018-02-15 15:30:54 +03:00

16 lines
479 B
JavaScript

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