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

Dev module loader doesn't support live bindings #242

Closed
Rich-Harris opened this issue Dec 8, 2020 · 0 comments · Fixed by #245
Closed

Dev module loader doesn't support live bindings #242

Rich-Harris opened this issue Dec 8, 2020 · 0 comments · Fixed by #245
Labels
bug Something isn't working

Comments

@Rich-Harris
Copy link
Member

I thought we might be able to get away with this, since live bindings aren't likely to be an issue during SSR, but I was wrong — working on #229, I discovered that in order to make paths configurable at runtime (so that svelte-kit start continues to work with a build that defaults to the paths declared in svelte.config.js), we need to have live bindings. Otherwise

import { base, assets } from '$app/path';

will yield a pair of undefined paths.

I think I know how to implement it (replace all references to named imported bindings like foo with __import1.foo, replace all exports.foo = foo with Object.defineProperty(exports, 'foo', { get: () => foo }), it's just a bit of a nuisance

@Rich-Harris Rich-Harris added bug Something isn't working pkg:kit labels Dec 8, 2020
@Rich-Harris Rich-Harris added this to the public beta milestone Dec 8, 2020
Rich-Harris added a commit that referenced this issue Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant