Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: capture watch mode when called via the Rollup API #384

Merged
merged 1 commit into from
Jul 12, 2022

Commits on Jul 10, 2022

  1. feat: capture watch mode when called via the Rollup API

    - `process.env.ROLLUP_WATCH` is only set when using the CLI
      - when using watch mode through the Rollup API (https://rollupjs.org/guide/en/#rollupwatch), this is not set
      - but since Rollup 2.14.0 (https://github.com/rollup/rollup/blob/master/CHANGELOG.md#2140), `this.meta.watchMode` is available
        - still check the env variable for backward-compat on older Rollup versions
    
    - notably, this is needed to test watch mode, since the tests are done via the Rollup API
    agilgur5 committed Jul 10, 2022
    Configuration menu
    Copy the full SHA
    c00aaeb View commit details
    Browse the repository at this point in the history