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

Nuxt and SSR #92

Closed
michaelpumo opened this issue Jun 28, 2018 · 2 comments
Closed

Nuxt and SSR #92

michaelpumo opened this issue Jun 28, 2018 · 2 comments

Comments

@michaelpumo
Copy link

I've read all I can about integrating Vue Design System into an existing project, but not seeing anything about Nuxt and SSR - not even in the FAQ.

Related to this issue: #91

I have started out with a completely fresh clone of the Vue Design System 3 and when importing the default TextStyle component into my (bare bones) Nuxt project, I get this error:

nuxt:render Rendering url / +0ms
{ ReferenceError: window is not defined
    at Object.<anonymous> (/Users/paranoidandroid/Documents/websites/test-design-system/dist/system/system.js:1:277)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)
    at r (/Users/paranoidandroid/Documents/websites/Nuxt-SSR/node_modules/vue-server-renderer/build.js:8330:16)
    at Object.<anonymous> (server-bundle.js:3485:18)
    at __webpack_require__ (webpack:/webpack/bootstrap d2c3f5ec4324fdf353ad:25:0)
    at Object.<anonymous> (plugins/vue-design-system.js:1:0)
    at __webpack_require__ (webpack:/webpack/bootstrap d2c3f5ec4324fdf353ad:25:0)
    at Object.<anonymous> (.nuxt/index.js:1:0)
    at __webpack_require__ (webpack:/webpack/bootstrap d2c3f5ec4324fdf353ad:25:0)
    at Object.<anonymous> (.nuxt/server.js:1:0) statusCode: 500, name: 'ReferenceError' }

Seems like Vue Design System's liberal use of window in the build system.js means that it isn't guarding against use cases for SSR.

Can anyone confirm if the design system can work with Nuxt? Is it simply a bug?

@arielsalminen
Copy link
Owner

arielsalminen commented Jul 12, 2018

@michaelpumo Just returned from a 5 week “offline” trip, hence the little delay here. Let me get back to this early next week when I’ve survived the jet lag :)

@arielsalminen
Copy link
Owner

@michaelpumo Vue Design System does not use “window” anywhere actually and this whole issue is related to something else. I just commented about it in your other issue. Closing this one for now since this should get fixed too once the build process has been rebuild.

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