Skip to content

Commit fd8d86e

Browse files
authored
Merge pull request #357 from smalruby/fix-pwa
2 parents 171d749 + 79a81f4 commit fd8d86e

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

webpack.config.js

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -99,38 +99,6 @@ const distConfig = baseConfig.clone()
9999
}
100100
]
101101
})
102-
)
103-
.addPlugin(
104-
new WorkboxPlugin.GenerateSW({
105-
clientsClaim: true,
106-
skipWaiting: true,
107-
additionalManifestEntries: assetsManifest,
108-
exclude: [
109-
/\.DS_Store/
110-
],
111-
maximumFileSizeToCacheInBytes: 32 * 1024 * 1024
112-
})
113-
)
114-
.addPlugin(
115-
new WebpackPwaManifest({
116-
name: 'Smalruby',
117-
short_name: 'Smalruby',
118-
description: 'GraphicaL User Interface for creating and running Smalruby 3.0 projects',
119-
background_color: '#ffffff',
120-
orientation: 'any',
121-
crossorigin: 'use-credentials',
122-
inject: true,
123-
ios: {
124-
'apple-mobile-web-app-title': 'Smalruby',
125-
'apple-mobile-web-app-status-bar-style': 'default'
126-
},
127-
icons: [
128-
{
129-
src: path.resolve('static/pwa-icon.png'),
130-
sizes: [96, 128, 192, 256, 384, 512] // multiple sizes
131-
}
132-
]
133-
})
134102
);
135103

136104
// build the examples and debugging tools in `build/`
@@ -193,7 +161,39 @@ const buildConfig = baseConfig.clone()
193161
context: 'src/examples'
194162
}
195163
]
196-
}));
164+
}))
165+
.addPlugin(
166+
new WorkboxPlugin.GenerateSW({
167+
clientsClaim: true,
168+
skipWaiting: true,
169+
additionalManifestEntries: assetsManifest,
170+
exclude: [
171+
/\.DS_Store/
172+
],
173+
maximumFileSizeToCacheInBytes: 32 * 1024 * 1024
174+
})
175+
)
176+
.addPlugin(
177+
new WebpackPwaManifest({
178+
name: 'Smalruby',
179+
short_name: 'Smalruby',
180+
description: 'GraphicaL User Interface for creating and running Smalruby 3.0 projects',
181+
background_color: '#ffffff',
182+
orientation: 'any',
183+
crossorigin: 'use-credentials',
184+
inject: true,
185+
ios: {
186+
'apple-mobile-web-app-title': 'Smalruby',
187+
'apple-mobile-web-app-status-bar-style': 'default'
188+
},
189+
icons: [
190+
{
191+
src: path.resolve('static/pwa-icon.png'),
192+
sizes: [96, 128, 192, 256, 384, 512] // multiple sizes
193+
}
194+
]
195+
})
196+
);
197197

198198
// Skip building `dist/` unless explicitly requested
199199
// It roughly doubles build time and isn't needed for `scratch-gui` development

0 commit comments

Comments
 (0)