@docusaurus/plugin-pwa 0.0.0-6062 → 0.0.0-6064

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 CHANGED
@@ -69,7 +69,11 @@ function pluginPWA(context, options) {
69
69
  configureWebpack(config) {
70
70
  return {
71
71
  plugins: [
72
- new webpack_1.default.EnvironmentPlugin({
72
+ new webpack_1.default.EnvironmentPlugin(
73
+ // See https://github.com/facebook/docusaurus/pull/10455#issuecomment-2317593528
74
+ // See https://github.com/webpack/webpack/commit/adf2a6b7c6077fd806ea0e378c1450cccecc9ed0#r145989788
75
+ // @ts-expect-error: bad Webpack type?
76
+ {
73
77
  PWA_DEBUG: debug,
74
78
  PWA_SERVICE_WORKER_URL: path_1.default.posix.resolve(`${config.output?.publicPath || '/'}`, 'sw.js'),
75
79
  PWA_OFFLINE_MODE_ACTIVATION_STRATEGIES: offlineModeActivationStrategies,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-pwa",
3
- "version": "0.0.0-6062",
3
+ "version": "0.0.0-6064",
4
4
  "description": "Docusaurus Plugin to add PWA support.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/plugin-pwa.d.ts",
@@ -22,13 +22,13 @@
22
22
  "dependencies": {
23
23
  "@babel/core": "^7.23.3",
24
24
  "@babel/preset-env": "^7.23.3",
25
- "@docusaurus/core": "0.0.0-6062",
26
- "@docusaurus/logger": "0.0.0-6062",
27
- "@docusaurus/theme-common": "0.0.0-6062",
28
- "@docusaurus/theme-translations": "0.0.0-6062",
29
- "@docusaurus/types": "0.0.0-6062",
30
- "@docusaurus/utils": "0.0.0-6062",
31
- "@docusaurus/utils-validation": "0.0.0-6062",
25
+ "@docusaurus/core": "0.0.0-6064",
26
+ "@docusaurus/logger": "0.0.0-6064",
27
+ "@docusaurus/theme-common": "0.0.0-6064",
28
+ "@docusaurus/theme-translations": "0.0.0-6064",
29
+ "@docusaurus/types": "0.0.0-6064",
30
+ "@docusaurus/utils": "0.0.0-6064",
31
+ "@docusaurus/utils-validation": "0.0.0-6064",
32
32
  "babel-loader": "^9.1.3",
33
33
  "clsx": "^2.0.0",
34
34
  "core-js": "^3.31.1",
@@ -42,7 +42,7 @@
42
42
  "workbox-window": "^7.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@docusaurus/module-type-aliases": "0.0.0-6062",
45
+ "@docusaurus/module-type-aliases": "0.0.0-6064",
46
46
  "fs-extra": "^11.1.0"
47
47
  },
48
48
  "peerDependencies": {
@@ -52,5 +52,5 @@
52
52
  "engines": {
53
53
  "node": ">=18.0"
54
54
  },
55
- "gitHead": "f32caf7a9bd354b43ea373b232021955fb95af2d"
55
+ "gitHead": "f9f463e54c7ff8013cb938f94857af8e4bff5a72"
56
56
  }
package/src/index.ts CHANGED
@@ -92,15 +92,20 @@ export default function pluginPWA(
92
92
  configureWebpack(config) {
93
93
  return {
94
94
  plugins: [
95
- new webpack.EnvironmentPlugin({
96
- PWA_DEBUG: debug,
97
- PWA_SERVICE_WORKER_URL: path.posix.resolve(
98
- `${(config.output?.publicPath as string) || '/'}`,
99
- 'sw.js',
100
- ),
101
- PWA_OFFLINE_MODE_ACTIVATION_STRATEGIES:
102
- offlineModeActivationStrategies,
103
- }),
95
+ new webpack.EnvironmentPlugin(
96
+ // See https://github.com/facebook/docusaurus/pull/10455#issuecomment-2317593528
97
+ // See https://github.com/webpack/webpack/commit/adf2a6b7c6077fd806ea0e378c1450cccecc9ed0#r145989788
98
+ // @ts-expect-error: bad Webpack type?
99
+ {
100
+ PWA_DEBUG: debug,
101
+ PWA_SERVICE_WORKER_URL: path.posix.resolve(
102
+ `${(config.output?.publicPath as string) || '/'}`,
103
+ 'sw.js',
104
+ ),
105
+ PWA_OFFLINE_MODE_ACTIVATION_STRATEGIES:
106
+ offlineModeActivationStrategies,
107
+ },
108
+ ),
104
109
  ],
105
110
  };
106
111
  },