Skip to content

Commit

Permalink
feat(lib): read .env for web (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-suwala authored Oct 9, 2023
1 parent 9f7e670 commit 86132d6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
11 changes: 10 additions & 1 deletion samples/react-native-group-chat/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ module.exports = function (api) {
api.cache(true)
return {
presets: ["babel-preset-expo"],
plugins: ["@babel/plugin-proposal-export-namespace-from", "react-native-reanimated/plugin"],
plugins: [
"@babel/plugin-proposal-export-namespace-from",
"react-native-reanimated/plugin",
[
"transform-inline-environment-variables",
{
include: ["EXPO_PUBLIC_PUBNUB_SUB_KEY", "EXPO_PUBLIC_PUBNUB_PUB_KEY"],
},
],
],
}
}
1 change: 1 addition & 0 deletions samples/react-native-group-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@svgr/webpack": "^8.1.0",
"@types/react": "~18.0.14",
"babel-plugin-inline-react-svg": "^2.0.2",
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"react-native-svg-transformer": "^1.1.0",
"typescript": "^5.1.3"
},
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4049,6 +4049,11 @@ babel-plugin-transform-flow-enums@^0.0.2:
dependencies:
"@babel/plugin-syntax-flow" "^7.12.1"

babel-plugin-transform-inline-environment-variables@^0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-environment-variables/-/babel-plugin-transform-inline-environment-variables-0.4.4.tgz#974245008b3cbbd646bd81707af147aea3acca43"
integrity sha512-bJILBtn5a11SmtR2j/3mBOjX4K3weC6cq+NNZ7hG22wCAqpc3qtj/iN7dSe9HDiS46lgp1nHsQgeYrea/RUe+g==

babel-preset-current-node-syntax@^1.0.0:
version "1.0.1"
resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz"
Expand Down Expand Up @@ -9122,11 +9127,6 @@ mkdirp@^1.0.3, mkdirp@^1.0.4:
resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==

mock-fs@^5.2.0:
version "5.2.0"
resolved "https://registry.npmjs.org/mock-fs/-/mock-fs-5.2.0.tgz"
integrity sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw==

[email protected]:
version "2.0.0"
resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
Expand Down

0 comments on commit 86132d6

Please sign in to comment.