@henderea/static-site-builder 1.10.24 → 1.10.25

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.
@@ -114,31 +114,36 @@ const plugins = [
114
114
  new MiniCssExtractPlugin({
115
115
  filename: cssFilename
116
116
  }),
117
- new WebpackManifestPlugin({
118
- fileName: 'asset-manifest.json',
119
- publicPath,
120
- filter(file) {
121
- if(/^[/]?[.]{2}[/]?/.test(file.path)) { return false; }
122
- if(/\.ts$/.test(file.path)) { return false; }
123
- if(/(^|[/])\./.test(file.name)) { return false; }
124
- return true;
125
- }
126
- }),
127
- new GenerateSW({
128
- // Don't precache sourcemaps (they're large) and build asset manifest:
129
- exclude: [/\.map$/, /asset-manifest\.json$/, /^[/]?[.]{2}/, /.ts$/],
130
- // `navigateFallback` and `navigateFallbackWhitelist` are disabled by default; see
131
- // https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#service-worker-considerations
132
- navigateFallback: publicUrl + '/index.html',
133
- navigateFallbackDenylist: [/^\/_/],
134
- additionalManifestEntries,
135
- cleanupOutdatedCaches: true,
136
- clientsClaim: true,
137
- skipWaiting: true,
138
- runtimeCaching,
139
- }),
140
117
  ];
141
118
 
119
+ if(ssbConfig.disableSW !== true) {
120
+ plugins.push(
121
+ new WebpackManifestPlugin({
122
+ fileName: 'asset-manifest.json',
123
+ publicPath,
124
+ filter(file) {
125
+ if(/^[/]?[.]{2}[/]?/.test(file.path)) { return false; }
126
+ if(/\.ts$/.test(file.path)) { return false; }
127
+ if(/(^|[/])\./.test(file.name)) { return false; }
128
+ return true;
129
+ }
130
+ }),
131
+ new GenerateSW({
132
+ // Don't precache sourcemaps (they're large) and build asset manifest:
133
+ exclude: [/\.map$/, /asset-manifest\.json$/, /^[/]?[.]{2}/, /.ts$/],
134
+ // `navigateFallback` and `navigateFallbackWhitelist` are disabled by default; see
135
+ // https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#service-worker-considerations
136
+ navigateFallback: publicUrl + '/index.html',
137
+ navigateFallbackDenylist: [/^\/_/],
138
+ additionalManifestEntries,
139
+ cleanupOutdatedCaches: true,
140
+ clientsClaim: true,
141
+ skipWaiting: true,
142
+ runtimeCaching,
143
+ })
144
+ );
145
+ }
146
+
142
147
  if(ssbConfig.plugins && _.isArray(ssbConfig.plugins)) {
143
148
  plugins.push(...ssbConfig.plugins);
144
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henderea/static-site-builder",
3
- "version": "1.10.24",
3
+ "version": "1.10.25",
4
4
  "description": "A static site builder",
5
5
  "main": "index.js",
6
6
  "repository": "henderea/static-site-builder.git",