@bahmutov/cy-rollup

Cypress Rollup preprocessor

Usage no npm install needed!

<script type="module">
  import bahmutovCyRollup from 'https://cdn.skypack.dev/@bahmutov/cy-rollup';
</script>

README

@bahmutov/cy-rollup ci status

Implementation copied from bahmutov/rolling-task

Use

// cypress/plugins/index.js

const rollupPreprocessor = require('@bahmutov/cy-rollup')

/**
 * @type {Cypress.PluginConfig}
 */
module.exports = (on, config) => {
  const options = {
    // Provide an alternative rollup config file.
    // The default is rollup.config.js at the project root.
    configFile: "cypress/rollup-test.config.js"
  }

  on('file:preprocessor', rollupPreprocessor(options))
}

Debugging

Run with environment variable

DEBUG=@bahmutov/cy-rollup