Different release & debug config in a nativescript

2019-08-17 08:20发布

I've created 2 files: "config.debug.ts" & "config.release.ts". My understanding is that NativeScript's build script should copy the appropriate file to "config.ts" during the build. And then I should be able to do something like "import { config } from './config'" from my other *.ts files. That however does not happen and I'm getting a compilation error when doing "tns run".

Now, I'm in doubt if I'm doing this properly at all.. What is the "true NS" way to have different configs for debug & release builds?

0条回答
登录 后发表回答