From 6e690f3fea816fd70bddf0a763698427b6ea836e Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Thu, 29 Aug 2019 16:30:24 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20ca?= =?UTF-8?q?che.manifest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.prod.config.js | 4 +++- client/index.html.template | 2 +- package-lock.json | 5 +++++ package.json | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build/webpack.prod.config.js b/build/webpack.prod.config.js index c8472dc2..87b93937 100644 --- a/build/webpack.prod.config.js +++ b/build/webpack.prod.config.js @@ -9,6 +9,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); +const AppCachePlugin = require('appcache-webpack-plugin'); const publicDir = path.resolve(__dirname, '../dist/tmp/public'); const clientDir = path.resolve(__dirname, '../client'); @@ -53,6 +54,7 @@ module.exports = merge(baseWpConfig, { template: `${clientDir}/index.html.template`, filename: `${publicDir}/index.html` }), - new CopyWebpackPlugin([{from: `${clientDir}/assets/*`, to: `${publicDir}/`, flatten: true}]) + new CopyWebpackPlugin([{from: `${clientDir}/assets/*`, to: `${publicDir}/`, flatten: true}]), + new AppCachePlugin({}) ] }); diff --git a/client/index.html.template b/client/index.html.template index ddf032dd..e7fccc26 100644 --- a/client/index.html.template +++ b/client/index.html.template @@ -1,5 +1,5 @@ - + diff --git a/package-lock.json b/package-lock.json index 8a93922a..3f006e8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -619,6 +619,11 @@ "normalize-path": "^2.1.1" } }, + "appcache-webpack-plugin": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/appcache-webpack-plugin/-/appcache-webpack-plugin-1.4.0.tgz", + "integrity": "sha512-QA0D+3yJmpPk0CyfxYMOzhzV941rkTSjCnUEy2vS05GeqK+mMnBScQSB23lstvzYaFpkeWeLMO9RamtafhliYw==" + }, "append-field": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", diff --git a/package.json b/package.json index 0c389af2..af5681d6 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "webpack-merge": "^4.1.5" }, "dependencies": { + "appcache-webpack-plugin": "^1.4.0", "axios": "^0.18.0", "base-x": "^3.0.5", "chardet": "^0.7.0",