Skip to content
This repository has been archived by the owner on Nov 22, 2020. It is now read-only.

Commit

Permalink
fix env and add example
Browse files Browse the repository at this point in the history
  • Loading branch information
kabaluyot committed Apr 9, 2020
1 parent 1ad669e commit 5860d25
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .env.example

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ hooks
platforms

# Root Variables
.env
**/.DS_Store
2 changes: 1 addition & 1 deletion app/repository/api.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import qs from 'qs'

export const Config = {
baseURL: 'https://jsonplaceholder.typicode.com',
baseURL: TNS_API_URL,
headers: {
common: {
'Content-Type': 'application/json',
Expand Down
1 change: 1 addition & 0 deletions types/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare var TNS_ENV: string
declare var TNS_API_URL: string
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ module.exports = env => {
new webpack.DefinePlugin({
"global.TNS_WEBPACK": "true",
"TNS_ENV": JSON.stringify(mode),
"TNS_API_URL": (mode === "production") ? JSON.stringify("https://jsonplaceholder.typicode.com") : JSON.stringify("https://jsonplaceholder.typicode.com"),
"process": "global.process"
}),
// Remove all files from the out dir.
Expand Down

0 comments on commit 5860d25

Please sign in to comment.