Skip to content

Multiple preprocessors, doesn't get parsed content from previous preprocessor #4141

Closed
@atwoodhouse

Description

@atwoodhouse

Thanks for an amazing framework that surely will take over the world in the years to come!

I'm writing my first Svelte (Sapper) project and want to use two great preprocessors combined:

  • @kazzkiq/svelte-preprocess-scss
  • svelte-image

In my rollup.config.js I've defined the preprocess pipeline as such:

preprocess: [ { style: scss() }, { ...image({ placeholder: 'trace' }) } ]

svelte-image uses svelte.process() to parse the content, but fails to do so because unparsed scss remains in the content it receives, even though it's after the scss preprocessor in the pipeline.

Have I misunderstood how the Svelte preprocessor pipeline should be defined, or is this a bug in Svelte?

Here's a minimal example of the issue: https://github.com/atwoodhouse/example-svelte-multiple-preprocessors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions