gatsby-plugin-redirects
Advanced tools
Comparing version 0.0.1-0 to 0.0.1-1
const fs = require('fs') | ||
const { onPostBuild } = require('gatsby-plugin-meta-redirect') | ||
const FILE_NAME = 'redirects.json' | ||
const FILE_NAME = './redirects.json' | ||
@@ -16,7 +16,7 @@ const fileExists = filePath => { | ||
exports.onCreatePages = ({ actions }) => { | ||
exports.createPages = ({ actions }) => { | ||
const { createRedirect } = actions | ||
if (fileExists(FILE_NAME)) { | ||
const redirects = require(FILE_NAME) | ||
const redirects = JSON.parse(fs.readFileSync(FILE_NAME, 'utf8')) | ||
@@ -23,0 +23,0 @@ redirects.map(redirect => { |
@@ -5,3 +5,3 @@ { | ||
"author": "John Otander", | ||
"version": "0.0.1-0", | ||
"version": "0.0.1-1", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
931
2