79257116

Date: 2024-12-06 07:09:54
Score: 0.5
Natty:
Report link

The issue was the way i was adding the section that will override the webpack settings was incorrect and also I neded to check the if (!isServer) condition

plugins: [
    function customWebpackPlugin() {
      return {
        name: 'custom-webpack-plugin',
        configureWebpack(config, isServer, utils) {
          // Apply this configuration only for client-side builds
          if (!isServer) {
            return {
              optimization: {
                runtimeChunk: {
                  name: () => `runtime.main`, // Custom runtime file name
                },
              },
              output: {
                ...config.output,
                filename: 'assets/js/[name].[contenthash:8].js', // Custom path for main files
                chunkFilename: 'assets/js/[name].[contenthash:8].chunk.js', // Custom path for chunk files
              },
            };
          }
          return {};
        },
      };
    },
  ],

Once I added the above code to docusaurus.config.ts now its not adding the tilt

Thank you Bharat

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Bharat