Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do preprocess without bundling #255

Closed
pd4d10 opened this issue Sep 22, 2020 · 2 comments
Closed

Do preprocess without bundling #255

pd4d10 opened this issue Sep 22, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@pd4d10
Copy link

pd4d10 commented Sep 22, 2020

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

When using svelte to develop a library, it is recommended to ship source code (*.svelte) to npm and add a svelte field to package.json(from this document). If this library is used by someone, the rollup plugin would take these source code and recompile them.

The problem is, if some preprocessors are used in the library development (for example TypeScript), all users of this lib have to add these preprocessors to their app/library project, because rollup plugin would take the source code and recompile them.

Describe the solution you'd like

Provide a way to do preprocess without bundling. Take TypeScript as an example, input is <script lang="ts">/* TS code */</script> and output is <script>/* JS code */</script>

How important is this feature to you?

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

@kaisermann
Copy link
Member

kaisermann commented Sep 22, 2020

Hey, @pd4d10 👋 This feature is unrelated to svelte-preprocess since you can achieve what you want by calling svelte.preprocess with svelte-preprocess in some node script. However, if more people show interest in an easier way to only preprocess their components to some directory, we can create a simple CLI.

@kaisermann kaisermann added enhancement New feature or request question Further information is requested labels Sep 22, 2020
@kaisermann kaisermann self-assigned this Sep 22, 2020
@pd4d10
Copy link
Author

pd4d10 commented Sep 22, 2020

OK, I will do some digging and send a PR if possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants