{"record":{"id":"c9c66d8977a8d326","repo":"gohugoio/hugo","slug":"unsupported-drop-type-q","errorCode":null,"errorMessage":"unsupported drop type: %q","messagePattern":"unsupported drop type: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/esbuild/options.go","lineNumber":400,"sourceCode":"\tdefault:\n\t\terr = fmt.Errorf(\"unsupported platform type: %q\", opts.Platform)\n\t\treturn\n\t}\n\n\tvar defines map[string]string\n\tif opts.Defines != nil {\n\t\tdefines = hmaps.ToStringMapString(opts.Defines)\n\t}\n\n\tvar drop api.Drop\n\tswitch opts.Drop {\n\tcase \"\":\n\tcase \"console\":\n\t\tdrop = api.DropConsole\n\tcase \"debugger\":\n\t\tdrop = api.DropDebugger\n\tdefault:\n\t\terr = fmt.Errorf(\"unsupported drop type: %q\", opts.Drop)\n\t}\n\n\t// By default we only need to specify outDir and no outFile\n\toutDir := opts.OutDir\n\toutFile := \"\"\n\tvar sourceMap api.SourceMap\n\tswitch opts.SourceMap {\n\tcase \"inline\":\n\t\tsourceMap = api.SourceMapInline\n\tcase \"external\":\n\t\tsourceMap = api.SourceMapExternal\n\tcase \"linked\":\n\t\tsourceMap = api.SourceMapLinked\n\tcase \"\", \"none\":\n\t\tsourceMap = api.SourceMapNone\n\tdefault:\n\t\terr = fmt.Errorf(\"unsupported sourcemap type: %q\", opts.SourceMap)\n\t\treturn","sourceCodeStart":382,"sourceCodeEnd":418,"githubUrl":"https://github.com/gohugoio/hugo/blob/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/internal/js/esbuild/options.go#L382-L418","documentation":"Thrown when Drop is not console or debugger. These are the only markers esbuild can drop during a build.","triggerScenarios":"Setting Drop to logs, comments, or any other string.","commonSituations":"User assumes more granular drop options exist (Webpack/swc terminology).","solutions":["Use: console or debugger."],"exampleFix":"// before\n{{ $opts := dict \"drop\" \"logs\" }}\n\n// after\n{{ $opts := dict \"drop\" \"console\" }}","handlingStrategy":"validation","validationCode":"switch opts.Drop {\ncase \"\", \"console\", \"debugger\":\n    // ok\ndefault:\n    return fmt.Errorf(\"unsupported drop type: %q\", opts.Drop)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate Drop against {console, debugger} before Build.","Remember Drop is a single string, not a list."],"tags":["esbuild","options","drop","validation"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}