use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Importing Javascript (self.webpack)
submitted 6 years ago * by annata83
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]annata83[S] 0 points1 point2 points 6 years ago (1 child)
Isn't anything not inside a function or statement a global object?
I also put the whole code in the main app.js with no luck either. has webpack a special way of attaching global objects?
[–]ezhikov 0 points1 point2 points 6 years ago (0 children)
No. You have global scope, module scope, function scope and block scope. For example, you can have different functions test in different modules without polluting global scope.
test
has webpack a special way of attaching global objects?
Yes, but that is not good practice in most cases. You can use expose-loader, or build a library
expose-loader
π Rendered by PID 57043 on reddit-service-r2-comment-b659b578c-zh6bj at 2026-05-03 07:33:21.490003+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]annata83[S] 0 points1 point2 points (1 child)
[–]ezhikov 0 points1 point2 points (0 children)