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.
The
transformhook in a Rollup plugin can be either a function or an object with ahandlerfunction:https://rollupjs.org/plugin-development/#build-hooks
For example,
@rollup/plugin-yamlhas moved from atransformfunction to an object with ahandlerfunction in version 5.0.0: https://github.com/rollup/plugins/blob/639f45638234c1c3fabfb13615c78bebaef89ef2/packages/yaml/src/index.js#L32However,
@web/dev-server-rolluponly works with atransformfunction and silently fails with atransformobject with a `handler function:web/packages/dev-server-rollup/src/rollupAdapter.ts
Line 415 in 8be0f90
Ideally,
@web/dev-server-rollupwould handle bothtransformfunctions and objects.