{"version":3,"sources":["jsdelivr-header.js","/npm/vue-cli-plugin-bundle-sw@0.0.4/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,0BAA4B,QAAQ,mCAE1C,OAAO,QAAU,CAAC,EAAK,KACrB,MAAQ,eAAe,SAAE,IAAe,EAClC,EAAM,EAAI,QAAQ,EAAS,KAC3B,EAAO,EAAS,KAChB,EAAU,EAAS,QACnB,EAAiB,EAAS,gBAAkB,CAAC,EAC7C,EAAgB,CACpB,QAAS,CACP,SACA,mBAEF,MAAO,EACP,OAAQ,EACR,kBAAmB,cAChB,EAED,QAAS,IACH,EAAe,QAAU,EAAe,QAAU,GACtD,IAIA,EAAe,CACnB,OAAQ,EAAS,OACjB,QAAS,EAAI,QAAQ,QACrB,MACA,OACA,gBACA,WAGF,EAAI,cAAa,IACf,MAAM,EAAS,QAAQ,IAAI,qBACvB,GAAqB,QAAX,GAId,EACG,OAAO,yBACP,IAAI,0BAA2B,CAAC,CAAE,iBAAe,GACrD","file":"/npm/vue-cli-plugin-bundle-sw@0.0.4/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/vue-cli-plugin-bundle-sw@0.0.4/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const BundleServiceWorkerPlugin = require('./src/BundleServiceWorkerPlugin')\n\nmodule.exports = (api, options) => {\n  const { pluginOptions: { swBundle } } = options\n  const src = api.resolve(swBundle.src)\n  const dest = swBundle.dest\n  const plugins = swBundle.plugins\n  const workboxOptions = swBundle.workboxOptions || {}\n  const workBoxConfig = {\n    exclude: [\n      /\\.map$/,\n      /manifest\\.json$/,\n    ],\n    swSrc: src,\n    swDest: dest,\n    importWorkboxFrom: 'disabled',\n    ...workboxOptions,\n    ...{\n      exclude: [\n        ...(workboxOptions.exclude ? workboxOptions.exclude : []),\n        dest,\n      ],\n    }\n  }\n  const buildOptions = {\n    silent: swBundle.silent,\n    context: api.service.context,\n    src,\n    dest,\n    workBoxConfig,\n    plugins\n  }\n\n  api.chainWebpack(config => {\n    const target = process.env.VUE_CLI_BUILD_TARGET\n    if (target && target !== 'app') {\n      return\n    }\n\n    config\n      .plugin('bundle-service-worker')\n      .use(BundleServiceWorkerPlugin, [{ buildOptions }])\n  })\n}"]}