FUCNT Add zip step
authorHumberto Alfonso Díaz <humberto.alfonso@asvito.es>
Thu, 20 Jun 2019 06:55:22 +0000 (08:55 +0200)
committerLorenzo Tilve <ltilve@igalia.com>
Tue, 4 Feb 2020 08:42:15 +0000 (09:42 +0100)
package.json
webpack.config.js

index 37bd01b..1c221bc 100644 (file)
@@ -32,7 +32,8 @@
         "uglifyjs-webpack-plugin": "^2.1.1",
         "webpack": "^4.29.5",
         "webpack-cli": "^3.2.3",
-        "webpack-dev-server": "^3.7.2"
+        "webpack-dev-server": "^3.7.2",
+        "zip-webpack-plugin": "^3.0.0"
     },
     "dependencies": {
         "@iconfu/svg-inject": "^1.2.3",
index ec29d07..157b8be 100644 (file)
@@ -4,6 +4,8 @@ const CleanWebpackPlugin = require('clean-webpack-plugin');
 const HtmlWebpackPlugin = require('html-webpack-plugin');
 const MiniCSSExtractPlugin = require('mini-css-extract-plugin');
 const CopyPlugin = require('copy-webpack-plugin');
+const ZipPlugin = require('zip-webpack-plugin');
+
 
 module.exports = {
     mode: 'production',
@@ -40,6 +42,12 @@ module.exports = {
         new MiniCSSExtractPlugin({
             filename: 'app.css',
             path: __dirname + '/dist'
+        }),
+        new ZipPlugin({
+            path: __dirname + '/dist',
+            filename: 'homescreen',
+            extension: 'wgt',
+            exclude: []
         })
     ],
     module: {