Added manifest.json to production webpack config.

This commit is contained in:
orangemug 2017-11-29 11:29:48 +00:00
parent 2d87e162f1
commit 1f5608ec77

View file

@ -6,6 +6,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin');
var WebpackCleanupPlugin = require('webpack-cleanup-plugin'); var WebpackCleanupPlugin = require('webpack-cleanup-plugin');
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var CopyWebpackPlugin = require('copy-webpack-plugin');
var OUTPATH; var OUTPATH;
if(process.env.CIRCLE_ARTIFACTS) { if(process.env.CIRCLE_ARTIFACTS) {
@ -80,6 +81,12 @@ module.exports = {
template: './src/template.html', template: './src/template.html',
title: 'Maputnik' title: 'Maputnik'
}), }),
new CopyWebpackPlugin([
{
from: './src/manifest.json',
to: 'manifest.json'
}
]),
new BundleAnalyzerPlugin({ new BundleAnalyzerPlugin({
analyzerMode: 'static', analyzerMode: 'static',
defaultSizes: 'gzip', defaultSizes: 'gzip',