Skip to content

Commit

Permalink
build: env issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ddecrulle committed Dec 4, 2023
1 parent 8bb6c82 commit 634f8ec
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
16 changes: 0 additions & 16 deletions .eslintrc.cjs

This file was deleted.

16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"env": { "browser": true, "es2020": true },
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended"
],
"parserOptions": { "ecmaVersion": "latest", "sourceType": "module" },
"settings": { "react": { "version": "18.2" } },
"plugins": ["react-refresh"],
"rules": {
"react-refresh/only-export-components": "warn",
"react/prop-types": "off"
}
}
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
echo "window._env_['VITE_API_URL'] = '$VITE_API_URL';" >> /usr/share/nginx/html/env-config.js
echo "window._env_['API_URL'] = '$API_URL';" >> /usr/share/nginx/html/env-config.js
exec "$@"
7 changes: 2 additions & 5 deletions scripts/generate-entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ fs.readFile('.env', 'utf8')
.filter((data) => data.length === 2)
.map(
([key]) =>
`echo "window._env_['${key.replace(
'REACT_APP_',
''
)}'] = '\$${key.replace(
'REACT_APP_',
`echo "window._env_['${key.replace('VITE_', '')}'] = '\$${key.replace(
'VITE_',
''
)}';" >> /usr/share/nginx/html/env-config.js`
);
Expand Down

0 comments on commit 634f8ec

Please sign in to comment.