How to use the mwp-config.paths function in mwp-config

To help you get started, we’ve selected a few mwp-config 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 meetup / meetup-web-platform / packages / mwp-sw-plugin / src / index.js View on Github external
// @flow
const buildPaths = require('mwp-config').paths;
const path = require('path');

/*
 * The service worker plugin will register a root-level route for serving the
 * service worker script file.
 *
 * Disk location of the script file is determined by builder CLI config import.
 */
export function register(server: Object, options: ?Object) {
	/*
	 * Route for service worker script at top-level path. Depends on `Inert`
	 * `path` must match client `serviceWorker.register` call - MWP provides this
	 * in the `` component
	 */
	server.route({
		method: 'GET',

mwp-config

All the config you might ever need for a MWP app

MIT
Latest version published 1 year ago

Package Health Score

39 / 100
Full package analysis