How to use the @dojo/webpack-contrib/service-worker-plugin/ServiceWorkerPlugin function in @dojo/webpack-contrib

To help you get started, we’ve selected a few @dojo/webpack-contrib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dojo / cli-build-app / src / dev.config.ts View on Github external
icons: Array.isArray(manifest.icons)
					? manifest.icons.map((icon) => ({ ...icon, ios: true }))
					: manifest.icons
			}),
		new InsertScriptPlugin([
			{ content: ``, type: 'prepend' },
			{
				content: ``,
				type: 'append'
			}
		]),
		serviceWorkerOptions && new ServiceWorkerPlugin(serviceWorkerOptions),
		serviceWorkerOptions &&
			new InsertScriptPlugin({
				content: ``,
				type: 'append'
			}),
		new CleanWebpackPlugin(['dev', 'info'], { root: output!.path, verbose: false })
	].filter((item) => item);

	if (module) {
		module.rules = module.rules.map((rule) => {
github dojo / cli-build-app / src / dist.config.ts View on Github external
icons: Array.isArray(manifest.icons)
					? manifest.icons.map((icon) => ({ ...icon, ios: true }))
					: manifest.icons
			}),
		new InsertScriptPlugin([
			{ content: ``, type: 'prepend' },
			{
				content: ``,
				type: 'append'
			}
		]),
		serviceWorkerOptions && new ServiceWorkerPlugin(serviceWorkerOptions),
		serviceWorkerOptions &&
			new InsertScriptPlugin({
				content: ``,
				type: 'append'
			}),
		new webpack.BannerPlugin({
			banner,
			test: /^.*\.js$/i
		}),
		new CleanWebpackPlugin(['dist', 'info'], { root: output!.path, verbose: false })