Comments (15)
@vimutti77 if you look within the dist directory there is a types.d.ts file if you copy and paste that into your solution it will work, I'm currently looking into why this isnt being picked up automatically
from react-env.
released: https://www.npmjs.com/package/@beam-australia/react-env
from react-env.
@andrewmclagan thank you for sorting that man been slammed at work today so wasn't going to get to it till tonight
from react-env.
I'm currently not using the docker image as we are react applications within IIS still but future goal is move it to azure blob storage or the likes. The main motivator for us to use the library was to be able to do deployment time injections so we can do a build once deploy anywhere approach
from react-env.
Hello. For sure, I'd accept a PR for this.
from react-env.
Great your PR is merged and should be released as v2.1.0
thank you
from react-env.
While the definition is correct I still needed to shim this in so if you'd be happy to reopen it I will do more research to get this pulling through correctly, apologises was to eager to get it done.
from react-env.
How can I use it. I try to use it like this
import env from '@beam-australia/react-env';
export default {
secret: new URL(env('MY_SECRET')),
};
and I got this error
Could not find a declaration file for module '@beam-australia/react-env'
from react-env.
from react-env.
{
"name": "awesome",
"author": "Vandelay Industries",
"version": "1.0.0",
"main": "./lib/main.js",
"types": "./lib/main.d.ts"
}
Want to write a PR. You reference them in package json
from react-env.
@AnthonyCrowcroft Look like if I try to move types.d.ts
from node_modules/@beam-australia/react-env/dist
to node_modules/@beam-australia/react-env
and rename it to index.d.ts
. The types will be picked up properly.
from react-env.
Yeah although this is not desirable. We want it to pick them up via package.json
from react-env.
will release as v2.1.1
from react-env.
@vimutti77 you can now npm install and use as normal
from react-env.
No problem. Out of interest, you guys using the docker image in this repo for CRA?
from react-env.
Related Issues (20)
- how to pass env variables from docker compose HOT 2
- Possible improvement on Docker support HOT 1
- NextJs build step
- NextJS + Dockerfile HOT 1
- Incorrect type definitions for env function
- Default ENV behaviour misaligned with NextJS
- Using react-env on builded project
- Question HOT 3
- How to pick specific .env file? HOT 3
- Can this be used to pass env vars to docker container for NGINX? HOT 2
- window.__ENV undefined HOT 1
- Cache Busting HOT 3
- Broken Docker image on Docker Hub HOT 2
- Feedback/Docker Usage HOT 3
- window.__ENV not available HOT 1
- Please add documentation to the readme about importing __ENV file in the index.html HOT 1
- Improvement ideas and caveats HOT 1
- Usage with Jest and Storybook HOT 2
- feature request - load vars from single json file like env-cmd HOT 1
- Docker Error: EACCES: permission denied, open '/app/public/__ENV.js HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-env.