S
S
Sergey2017-01-20 09:26:41
JavaScript
Sergey, 2017-01-20 09:26:41

How to load old module with webpack?

I am trying to migrate one old project from requirejs to webpack
I have a very old view module
(function (window, document, undefined) { window.x = { .... } }(this, document))
And there is no way to have it like then modify, so the question is fundamental - how to load it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Khmyrov, 2017-01-20
@vivcogit

what's the problem with modifying it for webpack? I had to deal with this once, it was enough to pass this construction instead of this: typeof exports === 'undefined' ? window : exports

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question