Skip to content

Best practice to ship a library built with Svelte and preprocessors #5445

Closed
@pd4d10

Description

@pd4d10

Is your feature request related to a problem? Please describe.

It is recommended to ship source code (*.svelte) to npm according to this documentation, and the rollup plugin would take these source code and recompile them. However, preprocessors would cause some problems in this case:

  1. It requires users to add the same preprocessors to their app's rollup config.
  2. These preprocessors' config should also be the same as the library to keep consistant.

Describe alternatives you've considered

Very thankful to kaisermann, the solution is quite clearly explained in sveltejs/svelte-preprocess#255 (comment), and I'll do some digging later.

Just wondering If there is other best practice I missed.

How important is this feature to you?

We encountered this problem when developing ByteMD, which is a hackable Markdown editor built with Svelte.

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