Добавил cache.manifest

This commit is contained in:
Book Pauk
2019-08-29 16:30:24 +07:00
parent 6321002617
commit 6e690f3fea
4 changed files with 10 additions and 2 deletions

View File

@@ -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({})
]
});

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html manifest="/app/manifest.appcache">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">

5
package-lock.json generated
View File

@@ -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",

View File

@@ -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",