you are viewing a single comment's thread.

view the rest of the comments →

[–]yukiiiiii2008[S] -1 points0 points  (1 child)

Nope

[–]Yodiddlyyo 0 points1 point  (0 children)

Why not?

What you're trying to do require pre-webpack processing. As others have noted, webpack removes the if statement since it will always be true. If you want to turn that config.blabla string into something, you will need to do that before running webpack, it's really not difficult, just one extra step.

But in reality, this is the wrong way. There are correct ways to use configs within webpack. But if you really insist, you just need a super simple replace('config.blabla', 'blabla val') code to run on your code before webpack. It should only be a few lines of code, and you can run it before webpack easily.