![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
gatsby-plugin-prismic-preview
Advanced tools
Enable previews of your prismic documents
Install module
npm install --save gatsby-plugin-prismic-preview
Add plugin to gatsby-config.js
:
{
resolve: 'gatsby-plugin-prismic-preview',
options: {
repositoryName: 'gatsby-source-prismic-test-site',
linkResolver: require('./src/linkResolver'),
path: '/preview',
}
}
repositoryName
Should be the same as the one in gatsby-source-prismic plugin
linkResolver
Inline function
options: {
linkResolver(doc) {
if (doc.type === 'BlogPost') {
return `/blog/${doc.uid}`;
}
return `${doc.type}`;
},
},
or a require to a specific file (must be ES5 module.exports
format)
options: {
linkResolver: require('./src/utils/linkResolver'),
},
Where the preview page should live.
Defaults to /preview
.
Only allow previews on staging? In gatsby-config.js
do a conditional operation:
const plugins = [
'plugin-1',
'plugin-2',
];
if (process.env.NODE_ENV === 'staging') {
plugins.push({
resolve: 'gatsby-plugin-prismic-preview',
options: {}
});
}
module.exports = {
siteMetadata: {
title: 'Gatsby Default Starter',
},
plugins,
};
FAQs
Enable previews for gatsby-source-prismic
The npm package gatsby-plugin-prismic-preview receives a total of 7 weekly downloads. As such, gatsby-plugin-prismic-preview popularity was classified as not popular.
We found that gatsby-plugin-prismic-preview demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.