File size: 661 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
/**
*WARNING: No ES6 modules here. Not transpiled! ****
*/
const getBaseWebpackConfig = require( '@automattic/calypso-build/webpack.config.js' );
const ReadableJsAssetsWebpackPlugin = require( '@wordpress/readable-js-assets-webpack-plugin' );
function getWebpackConfig( env, argv ) {
const webpackConfig = getBaseWebpackConfig( { ...env, WP: true }, argv );
return {
...webpackConfig,
entry: {
editor: './src/editor.js',
view: './src/view.js',
},
output: {
...webpackConfig.output,
filename: '[name].min.js',
},
plugins: [ ...webpackConfig.plugins, new ReadableJsAssetsWebpackPlugin() ],
};
}
module.exports = getWebpackConfig;
|