Skip to content

Conversation

@lacymorrow
Copy link
Contributor

@lacymorrow lacymorrow commented Apr 17, 2025

PR Type

  • Enhancement

Description

  • Migrate Next.js configuration to use withPlugins

  • Modularize MDX and PWA settings into separate modules

  • Update manifest asset paths and add SW support

  • Upgrade dependencies and VSCode recommendations


Changes walkthrough 📝

Relevant files
Enhancement
9 files
next.config.ts
Use withPlugins; remove legacy MDX/PWA code                           
+7/-65   
with-plugins.ts
Add dynamic plugin loader for Next.js config                         
+62/-0   
manifest.ts
Update asset paths for manifest and screenshots                   
+5/-5     
with-mdx.ts
Add separate module for MDX configuration                               
+30/-0   
with-pwa.ts
Add separate module for PWA configuration                               
+20/-0   
constants.ts
Define constant for Next.js plugins directory                       
+4/-0     
sw.js
Add new service worker implementation for caching               
+2/-0     
workbox-4754cb34.js
Add workbox script for advanced caching strategies             
+2/-0     
package.json
Update dependencies, scripts, and formatting                         
+165/-165
Documentation
1 files
extensions.json
Update extension recommendations with GitHub Actions         
+11/-10 
Additional files
3 files
pnpm-lock.yaml +1402/-1168
sw.js.map +1/-0     
workbox-4754cb34.js.map +1/-0     

Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @github-actions
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Migration Validation

    The configuration is migrated to use the withPlugins utility and legacy MDX/PWA code was removed. Please verify that the new plugin mechanism applies the correct order of configurations and that any removed functionality is properly migrated into independent plugins.

     */
    import { env } from "@/env";
    
    const nextConfig: NextConfig = {
    	/*
    	 * Redirects are located in the `src/config/routes.ts` file
    	 */
    	redirects,
    	/*
    	 * Next.js configuration
    	 */
    Asset Paths Update

    The asset paths for web manifest icons and screenshots have been updated. Confirm that these new paths are correct and that the referenced files are correctly located and accessible in the appropriate public directories.

    {
    	src: "/app/web-app-manifest-192x192.png",
    	sizes: "192x192",
    	type: "image/png",
    	purpose: "maskable",
    },
    {
    	src: "/app/web-app-manifest-192x192.png",
    	sizes: "192x192",

    @github-actions
    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Expand regex for file extensions

    Consider expanding the regex to also match JSX/TSX files if your plugin system may
    include them.

    src/config/with-plugins.ts [22-24]

     const pluginFiles = fs.readdirSync(pluginsDir)
    -	.filter(file => /\.(t|j|mj|mt)s$/.test(file))
    +	.filter(file => /\.(t|j|m)[sx]?$/i.test(file))
     	.sort(); // Apply plugins in alphabetical order
    Suggestion importance[1-10]: 6

    __

    Why: The suggestion is contextually relevant and improves file matching to include JSX/TSX files, enhancing flexibility without addressing a critical issue.

    Low

    @lacymorrow lacymorrow merged commit dd3737f into main Apr 17, 2025
    2 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants