1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, '__esModule', {
|
4 | value: true
|
5 | });
|
6 |
|
7 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
8 |
|
9 | var _path = require('path');
|
10 |
|
11 | var _path2 = _interopRequireDefault(_path);
|
12 |
|
13 | var _miscUtils = require('./misc/utils');
|
14 |
|
15 | var DEFAULT_AUTO_UPDATE_INTERVAL = 3600000;
|
16 |
|
17 | exports.DEFAULT_AUTO_UPDATE_INTERVAL = DEFAULT_AUTO_UPDATE_INTERVAL;
|
18 | var AppCacheOptions = {
|
19 | NETWORK: '*',
|
20 | FALLBACK: null,
|
21 | directory: 'appcache/',
|
22 | caches: ['main'],
|
23 | events: false,
|
24 | disableInstall: false,
|
25 | includeCrossOrigin: false
|
26 | };
|
27 |
|
28 | exports.AppCacheOptions = AppCacheOptions;
|
29 | exports['default'] = {
|
30 | caches: 'all',
|
31 | publicPath: void 0,
|
32 | updateStrategy: 'changed',
|
33 | responseStrategy: 'cache-first',
|
34 | externals: [],
|
35 | excludes: ['**/.*', '**/*.map', '**/*.gz'],
|
36 |
|
37 | relativePaths: ':relativePaths:',
|
38 | version: null,
|
39 | autoUpdate: false,
|
40 | cacheMaps: null,
|
41 | appShell: null,
|
42 |
|
43 | rewrites: function rewrites(asset) {
|
44 | return asset.replace(/^([\s\S]*?)index.htm(l?)$/, function (match, dir) {
|
45 | if ((0, _miscUtils.isAbsoluteURL)(match)) {
|
46 | return match;
|
47 | }
|
48 |
|
49 | return dir || './';
|
50 | });
|
51 | },
|
52 |
|
53 | ServiceWorker: {
|
54 | output: 'sw.js',
|
55 | entry: _path2['default'].join(__dirname, '../tpls/empty-entry.js'),
|
56 | scope: null,
|
57 | events: false,
|
58 | minify: null,
|
59 | forceInstall: false,
|
60 |
|
61 | updateViaCache: 'imports',
|
62 |
|
63 | prefetchRequest: {
|
64 | credentials: 'same-origin',
|
65 | headers: void 0,
|
66 | mode: 'cors',
|
67 | cache: void 0
|
68 | },
|
69 |
|
70 | navigationPreload: ':auto:'
|
71 | },
|
72 |
|
73 |
|
74 | AppCache: false,
|
75 |
|
76 |
|
77 | __tests: {
|
78 | swMetadataOnly: false,
|
79 | ignoreRuntime: false,
|
80 | noVersionDump: false,
|
81 | appCacheEnabled: false
|
82 | }
|
83 | }; |
\ | No newline at end of file |