@docusaurus/plugin-pwa 2.0.0-beta.16 → 2.0.0-beta.17
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 +5 -6
- package/lib/options.js +1 -1
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -10,11 +10,11 @@ exports.validateOptions = void 0;
|
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
11
|
const utils_1 = require("@docusaurus/utils");
|
|
12
12
|
const utils_2 = require("@docusaurus/core/lib/webpack/utils");
|
|
13
|
-
const LogPlugin_1 =
|
|
13
|
+
const LogPlugin_1 = tslib_1.__importDefault(require("@docusaurus/core/lib/webpack/plugins/LogPlugin"));
|
|
14
14
|
const theme_translations_1 = require("@docusaurus/theme-translations");
|
|
15
|
-
const path_1 =
|
|
16
|
-
const webpack_1 =
|
|
17
|
-
const terser_webpack_plugin_1 =
|
|
15
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
16
|
+
const webpack_1 = tslib_1.__importDefault(require("webpack"));
|
|
17
|
+
const terser_webpack_plugin_1 = tslib_1.__importDefault(require("terser-webpack-plugin"));
|
|
18
18
|
const workbox_build_1 = require("workbox-build");
|
|
19
19
|
const isProd = process.env.NODE_ENV === 'production';
|
|
20
20
|
function getSWBabelLoader() {
|
|
@@ -58,7 +58,6 @@ function pluginPWA(context, options) {
|
|
|
58
58
|
});
|
|
59
59
|
},
|
|
60
60
|
configureWebpack(config) {
|
|
61
|
-
var _a;
|
|
62
61
|
if (!isProd) {
|
|
63
62
|
return {};
|
|
64
63
|
}
|
|
@@ -66,7 +65,7 @@ function pluginPWA(context, options) {
|
|
|
66
65
|
plugins: [
|
|
67
66
|
new webpack_1.default.EnvironmentPlugin({
|
|
68
67
|
PWA_DEBUG: debug,
|
|
69
|
-
PWA_SERVICE_WORKER_URL: path_1.default.posix.resolve(`${
|
|
68
|
+
PWA_SERVICE_WORKER_URL: path_1.default.posix.resolve(`${config.output?.publicPath || '/'}`, 'sw.js'),
|
|
70
69
|
PWA_OFFLINE_MODE_ACTIVATION_STRATEGIES: offlineModeActivationStrategies,
|
|
71
70
|
PWA_RELOAD_POPUP: reloadPopup,
|
|
72
71
|
}),
|
package/lib/options.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.validateOptions = exports.Schema = void 0;
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
|
-
const path_1 =
|
|
11
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
12
12
|
const utils_validation_1 = require("@docusaurus/utils-validation");
|
|
13
13
|
const DEFAULT_OPTIONS = {
|
|
14
14
|
debug: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-pwa",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.17",
|
|
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.5",
|
|
24
24
|
"@babel/preset-env": "^7.16.11",
|
|
25
|
-
"@docusaurus/core": "2.0.0-beta.
|
|
26
|
-
"@docusaurus/theme-common": "2.0.0-beta.
|
|
27
|
-
"@docusaurus/theme-translations": "2.0.0-beta.
|
|
28
|
-
"@docusaurus/utils": "2.0.0-beta.
|
|
29
|
-
"@docusaurus/utils-validation": "2.0.0-beta.
|
|
25
|
+
"@docusaurus/core": "2.0.0-beta.17",
|
|
26
|
+
"@docusaurus/theme-common": "2.0.0-beta.17",
|
|
27
|
+
"@docusaurus/theme-translations": "2.0.0-beta.17",
|
|
28
|
+
"@docusaurus/utils": "2.0.0-beta.17",
|
|
29
|
+
"@docusaurus/utils-validation": "2.0.0-beta.17",
|
|
30
30
|
"babel-loader": "^8.2.3",
|
|
31
31
|
"clsx": "^1.1.1",
|
|
32
32
|
"core-js": "^3.21.0",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"workbox-window": "^6.5.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@docusaurus/module-type-aliases": "2.0.0-beta.
|
|
42
|
+
"@docusaurus/module-type-aliases": "2.0.0-beta.17",
|
|
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": "0032c0b0480083227af2e1b4da2d3ee6ce992403"
|
|
50
50
|
}
|