Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

rollup-prerender-plugin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-prerender-plugin - npm Package Compare versions

Comparing version
0.0.5
to
0.1.0
+7
-2
dist/index.js

@@ -16,3 +16,4 @@ 'use strict';

routes: ['/'],
hook: 'closeBundle',
hook: 'writeBundle',
removeScripts: false,
puppeteer: {},

@@ -37,3 +38,7 @@ ...userConfig,

const outputFile = path.join(routeOutputDir, './index.html');
fs.writeFileSync(outputFile, renderedRoute.html.trim());
let html = renderedRoute.html.trim();
if (config.removeScripts) {
html = html.replace(/\<script.+\<\/script>/, '');
}
fs.writeFileSync(outputFile, html);
}

@@ -40,0 +45,0 @@ prerenderer.destroy();

@@ -9,3 +9,4 @@ import { join } from 'path';

routes: ['/'],
hook: 'closeBundle',
hook: 'writeBundle',
removeScripts: false,
puppeteer: {},

@@ -30,3 +31,7 @@ ...userConfig,

const outputFile = join(routeOutputDir, './index.html');
writeFileSync(outputFile, renderedRoute.html.trim());
let html = renderedRoute.html.trim();
if (config.removeScripts) {
html = html.replace(/\<script.+\<\/script>/, '');
}
writeFileSync(outputFile, html);
}

@@ -33,0 +38,0 @@ prerenderer.destroy();

{
"name": "rollup-prerender-plugin",
"version": "0.0.5",
"version": "0.1.0",
"description": "A small Rollup plugin to prerender output.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -49,2 +49,10 @@ # Rollup Prerender Plugin

### `removeScripts`
Type: `Boolean`
Default: `false`
Remove all scripts tag from rendered html.
### `puppeteer`

@@ -51,0 +59,0 @@