File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,27 @@ More env flags that are usually passed by the CLI automatically:
45
45
- ` --env.platform=<platform> ` - for specifying the platform to use. Can be ` android ` or ` ios ` , or a custom platform in the future.
46
46
- ` --env.hmr ` - ` true ` if building with HMR enabled
47
47
48
- #### Using flags at runtime
48
+ <!-- #### Using flags at runtime -->
49
49
50
- In your app logic you can access ` env ` variables like the following:
50
+ <!-- In your app logic you can access `env` variables like the following: -->
51
51
52
- ``` js
52
+ <!-- ```js
53
53
if (process.env.production) {
54
54
// this is a build executed with the `--env.production` flag
55
55
// typically this would be your release build
56
56
} else {
57
57
// this is a debug/dev build
58
58
}
59
+ ``` -->
60
+
61
+ #### Using a .env file
62
+
63
+ You can add a ` .env ` file to your project root and add any values to it and access those at runtime.
64
+
65
+ ``` js
66
+ if (process .env .VAR_NAME ) {
67
+ // do work here if the variable is true
68
+ }
59
69
```
60
70
61
71
::: tip Note
@@ -69,16 +79,6 @@ if (__DEV__) {
69
79
70
80
:::
71
81
72
- #### Using a .env file
73
-
74
- You can add a ` .env ` file to your project root and add any values to it and access those at runtime.
75
-
76
- ``` js
77
- if (process .env .VAR_NAME ) {
78
- // do work here if the variable is true
79
- }
80
- ```
81
-
82
82
### CLI flags
83
83
84
84
When running a NativeScript app the following flags have an effect on the webpack config:
You can’t perform that action at this time.
0 commit comments