Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

workbox-webpack-plugin

Package Overview
Dependencies
Maintainers
3
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workbox-webpack-plugin - npm Package Compare versions

Comparing version 1.3.0 to 2.0.0

26

build/index.js
const swBuild = require('workbox-build');
const path = require('path');
const url = require('url');
/**

@@ -65,2 +65,26 @@ * Use the instance of this in the plugins array of the webpack config.

if (compilation.options.output.publicPath) {
const {publicPath} = compilation.options.output;
const compiledAssets = [];
for (let key in compilation.assets) {
if (Object.prototype.hasOwnProperty.call(compilation.assets, key)) {
compiledAssets.push(url.resolve(publicPath, key));
}
}
const publicPathTransform = (manifestEntries) =>
manifestEntries.map((entry) => {
if (compilation.assets[entry.url]) {
entry.url = url.resolve(publicPath, entry.url);
}
return entry;
});
if (Array.isArray(config.manifestTransforms)) {
config.manifestTransforms.unshift(publicPathTransform);
} else {
config.manifestTransforms = [publicPathTransform];
}
}
return config;

@@ -67,0 +91,0 @@ }

4

package.json
{
"name": "workbox-webpack-plugin",
"version": "1.3.0",
"version": "2.0.0",
"description": "A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.",

@@ -26,3 +26,3 @@ "keywords": [

"dependencies": {
"workbox-build": "^1.3.0"
"workbox-build": "^2.0.0"
},

@@ -29,0 +29,0 @@ "author": "Google's Web DevRel Team",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc