You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
consuming with webpack for node.js and isomorphic #98
Q. We're using script.js and webpack to bundle for both the browser and node.js. What is the best approach here to provide a fallback?
Current, as expected, I get this error (as expected) -
var doc = document
^
ReferenceError: document is not defined
Which is from this code -
})('$script', function () {
var doc = document
Reacted by kevin-miles, Amgad Naiem, clickstreammedia, Mykyta Svyrydenko, Murthy VVR, Germán Méndez Bravo, Loïc Mahieu, Ben Daley, Samuel Vaillant, Mark Slade and 2 more
Activity
Kronuz commentedon Sep 6, 2017
documentandheadvariables declaration only need to be moved to thecreate()function (so improt/require works in server side)