Skip to content

Support "export ... from" #4937

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

Closed
benmccann opened this issue May 30, 2020 · 2 comments
Closed

Support "export ... from" #4937

benmccann opened this issue May 30, 2020 · 2 comments

Comments

@benmccann
Copy link
Member

benmccann commented May 30, 2020

Is your feature request related to a problem? Please describe.
It is currently a bit verbose to use svelte with bundler file handlers like @rollup/plugin-url and Webpack file-loader

Describe the solution you'd like
I would like to be able to do:

export { default as successkid } from './successkid.jpg';

If I try this today I am told:

A component currently cannot have an export ... from

Describe alternatives you've considered
Right now I need to do:

import successkidJpg from './successkid.jpg';
export let successkid = successkidJpg;

How important is this feature to you?
It would make Svelte more joyful to work with. I have a workaround, but the current syntax is rather tedious

Additional context
There are lots of people wanting better static file handling in Sapper and this is a part of that

@pngwn
Copy link
Member

pngwn commented May 30, 2020

Duplicate of #2214

@pngwn pngwn marked this as a duplicate of #2214 May 30, 2020
@pngwn pngwn closed this as completed May 30, 2020
@benmccann
Copy link
Member Author

Adding an update here in case anyone finds this closed ticket. I don't actually need to do export at all

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

2 participants