Franco
04/12/2020, 12:36 AMbrowserDevelopmentRun
and browserProductionRun
but that feels like a "debug" and "release" thing where the former doesn't do any optimisations and the latter does.turansky
04/12/2020, 12:42 AMsomething similar to “product flavors”Like this?
Franco
04/12/2020, 3:43 AMturansky
04/12/2020, 7:10 AManton.bannykh
04/13/2020, 9:29 AMIlya Goncharov [JB]
04/13/2020, 9:58 AMrun
and build
, and you can configure each convenient, but at least for now this configurations affect both production and development variants
What options do you want to switch?Franco
04/15/2020, 2:34 AM<https://dev.api.whatever>
and the production build calls <https://api.whatever>
. Each configuration has a BASE_URL
constant which value is different depending on the build, so I just use BASE_URL
in the code and it knows which server to call depending on the build I'm running.
• Both the development and production builds can run in debug
and release
mode (without and with optimisations respectively).turansky
04/15/2020, 9:29 AM./gradlew run -Pmymode=localRelease
tasks {
patchWebpackConfig {
val mymode = project.property("mymode")
// language=JavaScript
patch("""
config.mode = ${getMode(mymode)}
// proxy configyration
config.proxy.url = ${getBaseUrl(mymode)}
""")
}
}
Franco
04/25/2020, 11:45 PM