Skip to content

Plugin Strip is incompatible with TypeScript plugins #42

@federicocarboni

Description

@federicocarboni
  • Rollup Plugin Name: Plugin Strip
  • Rollup Plugin Version: 1.3.1
  • Rollup Version: 1.27.2
  • Operating System (or Browser): Windows 10
  • Node Version: 12.13.0

How Do We Reproduce?

Create a new project, install rollup, @rollup/plugin-strip, typescript and rollup-plugin-typescript2 (or rollup-plugin-typescript). Create rollup.config.js and add a minimal configuration which includes any typescript file input and the plugins above.
Such as this one:

import strip from '@rollup/plugin-strip';
import ts from 'rollup-plugin-typescript2';  // same issue with rollup-plugin-typescript

export default {
  input: 'input.ts',
  output: {
    file: 'output.bundle.js',
    format: 'cjs',
  },
  plugins: [
    ts(),
    strip(),
  ]
}

Expected Behavior

The plugin should remove debugger, console.*, assert.equal.

Actual Behavior

The plugin doesn't affect the output.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions