Socket
Socket
Sign inDemoInstall

next-manifest

Package Overview
Dependencies
163
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 3.0.0

24

index.js

@@ -1,4 +0,2 @@

const {resolve} = require('path');
const pwaManifest = require('@pwa/manifest');
const pwaManifestIcons = require('@pwa/manifest-icons');

@@ -25,23 +23,13 @@ module.exports = (nextConfig = {}) => {

const {webpack, manifest} = nextConfig;
const { output, ...opts } = manifest;
if (!isServer && !dev) {
const m = pwaManifest.sync({
"background_color": "#FFFFFF",
"theme_color": "#FFFFFF",
"start_url": "/?utm_source=web_app_manifest",
...manifest
background_color: '#FFFFFF',
theme_color: '#FFFFFF',
start_url: '/?utm_source=web_app_manifest',
...opts
});
if (manifest.icons && manifest.icons.src) {
m.icons = pwaManifestIcons.sync({
src: manifest.icons.src,
cache: manifest.icons.cache || false,
output: resolve(process.cwd(), `./static/manifest/icons`),
publicPath: '/static/manifest/icons/',
sizes: manifest.icons.sizes || [192, 512]
});
}
pwaManifest.writeSync('./static/manifest/', m);
pwaManifest.writeSync(output, m);
}

@@ -48,0 +36,0 @@

const {createElement} = require('react')
const Manifest = ({
href = '/static/manifest/manifest.json',
href = '/static/manifest.json',
themeColor = '#FFFFFF',

@@ -6,0 +6,0 @@ initialScale = '1'

{
"name": "next-manifest",
"version": "2.0.1",
"version": "3.0.0",
"description": "Next.js plugins for Web Manifest and PWA",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -5,2 +5,6 @@ # next-manifest

# Updates
- After 3.x, icon generating is deprecated because of `worker_threads` is not supported on now platform.
# Installation

@@ -24,2 +28,6 @@

const defaults = {
// next-manifest options
outout: './static'/',
// manifest options
name: 'PWA',
icons: [

@@ -45,5 +53,5 @@ {

## manifest.json and icons
## manifest.json
After build is over without errors, `manifest.json` will be created at `static/manifest/`
After build is over without errors, `manifest.json` will be created at `output`

@@ -93,2 +101,2 @@ ## Deploying a manifest with more meta for PWA

MIT © [Jimmy Moon](https://ragingwind.me)
MIT © [Jimmy Moon](https://jimmymoon.dev)
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc