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

SSR intercepting extensions other than .html #939

Closed
esarbanis opened this issue Nov 22, 2017 · 1 comment
Closed

SSR intercepting extensions other than .html #939

esarbanis opened this issue Nov 22, 2017 · 1 comment

Comments

@esarbanis
Copy link
Contributor

Currently there is no way to intercept ssr components, if they do not have .html extension. There are situations, such as the one I am in now, that not all .html files a svelte component. In order to differentiate them from the plain html files I have given them the .svelte extension.

I propose to have a way of intercepting more than just one file extension like so: require('svelte/ssr/register')(['.svelte']), but leave the current default one as well, for backwards compatibility.

So, basically require('svelte/ssr/register') will register .html and require('svelte/ssr/register')(['.html', '.svelte']) will register both .html and .svelte

esarbanis added a commit to esarbanis/svelte that referenced this issue Nov 22, 2017
@esarbanis esarbanis changed the title SSR intercepting extensions other than .html SSR intercepting extensions other than .html Nov 22, 2017
esarbanis added a commit to esarbanis/svelte that referenced this issue Nov 22, 2017
esarbanis added a commit to esarbanis/svelte that referenced this issue Nov 23, 2017
esarbanis added a commit to esarbanis/svelte that referenced this issue Nov 23, 2017
Rich-Harris pushed a commit that referenced this issue Nov 23, 2017
@esarbanis
Copy link
Contributor Author

Closed via #940

sacrosanctic pushed a commit to sacrosanctic/svelte that referenced this issue Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant