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

brace import fails static builds #189

Closed
shawnbot opened this issue Jun 18, 2018 · 1 comment
Closed

brace import fails static builds #189

shawnbot opened this issue Jun 18, 2018 · 1 comment

Comments

@shawnbot
Copy link

Static builds have started failing for a project I'm working on since we upgraded to v5 with the following error:

ReferenceError: window is not defined
    at eval (webpack:///./node_modules/brace/index.js?:20265:21)

We're not using LiveEditor (yet!), but I suspect that somewhere it's being imported that webpack can't tree-shake it, and brace doesn't like being imported outside of the browser. I don't know if Kit supports code-splitting via dynamic import(), but that might be a way to get around this.

@jxnblk
Copy link
Member

jxnblk commented Jun 18, 2018

Thanks! Yeah, I think this was introduced with the Fetch component in #166 – I think the best solution is to find an editor component that works universally

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