Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Button component throws error with SSR #320

@horprogs

Description

@horprogs

Describe the bug
Button component has window, and I get error ReferenceError: window is not defined on server-side.

Expected behavior
Component mustn't throw error in server-side.

Screenshots
image

The tenth line contains window in file node_modules/material-components-vue/dist/button/index.js.

I guess it happens, because target is web in webpack config.
I found similar discussion about it webpack/webpack#6522.
Also, I found your issue, where you set taget: node, but now I can't find this config (cfd1070).

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions