webpack-generate-sw.js 697 B

123456789101112131415161718192021222324
  1. "use strict";
  2. /*
  3. Copyright 2019 Google LLC
  4. Use of this source code is governed by an MIT-style
  5. license that can be found in the LICENSE file or at
  6. https://opensource.org/licenses/MIT.
  7. */
  8. const joi = require('@hapi/joi');
  9. const basePartial = require('../partials/base');
  10. const defaults = require('../defaults');
  11. const generatePartial = require('../partials/generate');
  12. const webpackPartial = require('../partials/webpack');
  13. const supportedOptions = Object.assign({
  14. importScriptsViaChunks: joi.array().items(joi.string()),
  15. swDest: joi.string().default(defaults.swDestFilename)
  16. }, basePartial, generatePartial, webpackPartial);
  17. module.exports = joi.object().keys(supportedOptions);