diff --git a/src/webpack-plugin.ts b/src/webpack-plugin.ts index f445b36..7fff957 100644 --- a/src/webpack-plugin.ts +++ b/src/webpack-plugin.ts @@ -113,7 +113,6 @@ export default class CodePressWebpackPlugin { if (!aliases.has("@")) { const tsconfigPath = path.join(compiler.context, "tsconfig.json"); - console.log("[CodePress] Looking for @ alias in tsconfig:", tsconfigPath); try { if (fs.existsSync(tsconfigPath)) { @@ -127,7 +126,6 @@ export default class CodePressWebpackPlugin { if (pathsMatch) { const pathsContent = pathsMatch[1]; - console.log("[CodePress] Found paths block:", pathsContent.trim()); // Extract individual path mappings: "@/*": ["./src/*"] const pathPattern = /"([^"]+)"\s*:\s*\[\s*"([^"]+)"/g; @@ -143,15 +141,7 @@ export default class CodePressWebpackPlugin { .replace(/\/\*$/, ""); aliases.set(alias, targetPath); - console.log( - "[CodePress] Added alias from tsconfig:", - alias, - "->", - targetPath - ); } - } else { - console.log("[CodePress] No paths block found in tsconfig"); } } } catch (e) { @@ -163,7 +153,6 @@ export default class CodePressWebpackPlugin { const srcDir = path.join(compiler.context, "src"); if (fs.existsSync(srcDir)) { aliases.set("@", "src"); - console.log("[CodePress] Using default Next.js alias: @ → src"); } } } @@ -196,26 +185,17 @@ export default class CodePressWebpackPlugin { * Apply the plugin to the webpack compiler */ public apply(compiler: Compiler): void { - console.log("[CodePress] Plugin apply() called with options:", { - isServer: this.options.isServer, - dev: this.options.dev, - }); - // Skip server builds entirely if (this.options.isServer) { - console.log("[CodePress] Skipping: isServer=true"); return; } // Skip dev mode - module mapping not needed (dev has named IDs) // and env vars are handled by the SWC plugin if (this.options.dev) { - console.log("[CodePress] Skipping: dev=true"); return; } - console.log("[CodePress] Running in production mode, will build MODULE_MAP"); - // Disable optimizations that break CodePress preview in production builds. // This is REQUIRED for CodePress preview to work because: //