Skip to content

Doc Comments are not stripped when minify is true #240

@davidglezz

Description

@davidglezz

Reproduction link or steps

Input

// OK
/// OK
/* OK */
/*
ok
*/
/** NOT REMOVED */
/**
 NOT REMOVED
*/
export function toUpper(str: string): string {
  return str.toUpperCase()
}

/** 
 * This file is part of the example project.
 * @param str - The string to convert to lowercase.
 * @returns The lowercase version of the input string.
 * @example
 * ```ts
 * import { toLower } from './shared';
 * console.log(toLower('HELLO WORLD')); // Output: 'hello world'
 * ```
 */
export function toLower(str: string): string {
  return str.toLowerCase()
}

Output

/** NOT REMOVED */
/**
NOT REMOVED
*/
function e(e){return e.toUpperCase()}
/** 
* This file is part of the example project.
* @param str - The string to convert to lowercase.
* @returns The lowercase version of the input string.
* @example
* ```ts
* import { toLower } from './shared';
* console.log(toLower('HELLO WORLD')); // Output: 'hello world'
* ```
*/
function t(e){return e.toLowerCase()}export{t as toLower,e as toUpper};

What is expected?

At least for platform: 'browser' all this comments should be stripped

Expected Output

function e(e){return e.toUpperCase()}function t(e){return e.toLowerCase()}export{t as toLower,e as toUpper};

What is actually happening?

Comments are not removed.

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions