@docusaurus/plugin-pwa 0.0.0-4724 → 0.0.0-4727
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +3 -3
- package/lib/options.js +1 -3
- package/package.json +8 -8
- package/src/index.ts +3 -3
- package/src/options.ts +1 -2
package/lib/index.js
CHANGED
|
@@ -43,10 +43,10 @@ function pluginPWA(context, options) {
|
|
|
43
43
|
return {
|
|
44
44
|
name: 'docusaurus-plugin-pwa',
|
|
45
45
|
getThemePath() {
|
|
46
|
-
return
|
|
46
|
+
return '../lib/theme';
|
|
47
47
|
},
|
|
48
48
|
getTypeScriptThemePath() {
|
|
49
|
-
return
|
|
49
|
+
return '../src/theme';
|
|
50
50
|
},
|
|
51
51
|
getClientModules() {
|
|
52
52
|
return isProd ? [swRegister] : [];
|
|
@@ -100,7 +100,7 @@ function pluginPWA(context, options) {
|
|
|
100
100
|
}
|
|
101
101
|
const swSourceFileTest = /\.m?js$/;
|
|
102
102
|
const swWebpackConfig = {
|
|
103
|
-
entry:
|
|
103
|
+
entry: require.resolve('./sw.js'),
|
|
104
104
|
output: {
|
|
105
105
|
path: outDir,
|
|
106
106
|
filename: 'sw.js',
|
package/lib/options.js
CHANGED
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.validateOptions = exports.Schema = void 0;
|
|
10
|
-
const tslib_1 = require("tslib");
|
|
11
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
12
10
|
const utils_validation_1 = require("@docusaurus/utils-validation");
|
|
13
11
|
const DEFAULT_OPTIONS = {
|
|
14
12
|
debug: false,
|
|
@@ -20,7 +18,7 @@ const DEFAULT_OPTIONS = {
|
|
|
20
18
|
injectManifestConfig: {},
|
|
21
19
|
pwaHead: [],
|
|
22
20
|
swCustom: undefined,
|
|
23
|
-
swRegister:
|
|
21
|
+
swRegister: './registerSw.js',
|
|
24
22
|
reloadPopup: '@theme/PwaReloadPopup',
|
|
25
23
|
};
|
|
26
24
|
exports.Schema = utils_validation_1.Joi.object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-pwa",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4727",
|
|
4
4
|
"description": "Docusaurus Plugin to add PWA support.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-pwa.d.ts",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@babel/core": "^7.17.7",
|
|
24
24
|
"@babel/preset-env": "^7.16.11",
|
|
25
|
-
"@docusaurus/core": "0.0.0-
|
|
26
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
27
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
28
|
-
"@docusaurus/utils": "0.0.0-
|
|
29
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
25
|
+
"@docusaurus/core": "0.0.0-4727",
|
|
26
|
+
"@docusaurus/theme-common": "0.0.0-4727",
|
|
27
|
+
"@docusaurus/theme-translations": "0.0.0-4727",
|
|
28
|
+
"@docusaurus/utils": "0.0.0-4727",
|
|
29
|
+
"@docusaurus/utils-validation": "0.0.0-4727",
|
|
30
30
|
"babel-loader": "^8.2.3",
|
|
31
31
|
"clsx": "^1.1.1",
|
|
32
32
|
"core-js": "^3.21.1",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"workbox-window": "^6.5.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
42
|
+
"@docusaurus/module-type-aliases": "0.0.0-4727",
|
|
43
43
|
"fs-extra": "^10.0.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": "^16.8.4 || ^17.0.0",
|
|
47
47
|
"react-dom": "^16.8.4 || ^17.0.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "967bfff81002933a1c68980300233e0320398e04"
|
|
50
50
|
}
|
package/src/index.ts
CHANGED
|
@@ -64,10 +64,10 @@ export default function pluginPWA(
|
|
|
64
64
|
name: 'docusaurus-plugin-pwa',
|
|
65
65
|
|
|
66
66
|
getThemePath() {
|
|
67
|
-
return
|
|
67
|
+
return '../lib/theme';
|
|
68
68
|
},
|
|
69
69
|
getTypeScriptThemePath() {
|
|
70
|
-
return
|
|
70
|
+
return '../src/theme';
|
|
71
71
|
},
|
|
72
72
|
|
|
73
73
|
getClientModules() {
|
|
@@ -138,7 +138,7 @@ export default function pluginPWA(
|
|
|
138
138
|
const swSourceFileTest = /\.m?js$/;
|
|
139
139
|
|
|
140
140
|
const swWebpackConfig: Configuration = {
|
|
141
|
-
entry:
|
|
141
|
+
entry: require.resolve('./sw.js'),
|
|
142
142
|
output: {
|
|
143
143
|
path: outDir,
|
|
144
144
|
filename: 'sw.js',
|
package/src/options.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import path from 'path';
|
|
9
8
|
import {Joi} from '@docusaurus/utils-validation';
|
|
10
9
|
import type {
|
|
11
10
|
ThemeConfig,
|
|
@@ -24,7 +23,7 @@ const DEFAULT_OPTIONS = {
|
|
|
24
23
|
injectManifestConfig: {},
|
|
25
24
|
pwaHead: [],
|
|
26
25
|
swCustom: undefined,
|
|
27
|
-
swRegister:
|
|
26
|
+
swRegister: './registerSw.js',
|
|
28
27
|
reloadPopup: '@theme/PwaReloadPopup',
|
|
29
28
|
};
|
|
30
29
|
|