Skip to content

[@web/dev-server-rollup] Doesn't work with plugins that have a transform object instead of function #3120

Description

@akrawitz

The transform hook in a Rollup plugin can be either a function or an object with a handler function:
https://rollupjs.org/plugin-development/#build-hooks

For example, @rollup/plugin-yaml has moved from a transform function to an object with a handler function in version 5.0.0: https://github.com/rollup/plugins/blob/639f45638234c1c3fabfb13615c78bebaef89ef2/packages/yaml/src/index.js#L32

However, @web/dev-server-rollup only works with a transform function and silently fails with a transform object with a `handler function:

if (typeof rollupPlugin.transform === 'function') {

Ideally, @web/dev-server-rollup would handle both transform functions and objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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