Hi! Does anyone know how to add configuration to i...
# javascript
t
Hi! Does anyone know how to add configuration to identify for development build and production build? Something like
BuildConfig.DEBUG
on Android
t
process.env.NODE_ENV
?
❤️ 1
Or string-replace-loader for more flexibility
t
Thank you @turansky. Let me try with
process.env.NODE_ENV
. I know nothing about webpack configuration 😐
s
This is what I use to enable development mode in webpack:
Copy code
js {
  browser {
    commonWebpackConfig {
      mode = org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig.Mode.DEVELOPMENT
    }
  }
}
t
Separate tasks already exist for both modes