# Drab webpack problem - Uncaught ReferenceError: require is not defined

**URL:** <https://forum.elixirforum.com/t/drab-webpack-problem-uncaught-referenceerror-require-is-not-defined/14402>\
**Category:** Questions\
**Tags:** phoenix, drab, webpack, socket\
**Created:** [May 27, 2018, 5:16pm UTC](https://forum.elixirforum.com/t/drab-webpack-problem-uncaught-referenceerror-require-is-not-defined/14402 "2018-05-27T17:16:13Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![grych](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/grych/32/5610_2.png) [@grych](https://forum.elixirforum.com/u/grych)\
**Post date:** [May 28, 2018, 2:08pm UTC](https://forum.elixirforum.com/t/drab-webpack-problem-uncaught-referenceerror-require-is-not-defined/14402/11 "2018-05-28T14:08:40Z")

</div>

Cool.

So, the configuration:

```
config :drab, socket_constructor: "window.socket"

```

would fix your issue? I understand you now just hacked Drab changing its JS file, yes?

---

_[View the full topic](https://forum.elixirforum.com/t/drab-webpack-problem-uncaught-referenceerror-require-is-not-defined/14402)._
