# Can I load a .env file fom the project directory?

**URL:** <https://forum.babylonjs.com/t/can-i-load-a-env-file-fom-the-project-directory/43071>\
**Category:** Questions\
**Tags:** environment, loaders\
**Created:** [August 7, 2023, 11:36am UTC](https://forum.babylonjs.com/t/can-i-load-a-env-file-fom-the-project-directory/43071 "2023-08-07T11:36:08Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![jelster](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jelster/32/25881_2.png) [@jelster](https://forum.babylonjs.com/u/jelster)\
**Post date:** [August 8, 2023, 12:20pm UTC](https://forum.babylonjs.com/t/can-i-load-a-env-file-fom-the-project-directory/43071/7 "2023-08-08T12:20:37Z")

</div>

It’s an understandable question! What I do in [the book as part of Space-Truckers](https://forum.babylonjs.com/t/available-now-to-pre-order-new-book-on-how-to-babylonjs/29958) is to load the content into a variable via **import** then pass that to the constructor for the Cube. By doing that, WebPack knows to bring the asset into the asset bundle and make it available to your app.

As mentioned upthread any local http server will do for running and hosting files locally as well so they can be referred to by URL. Some BJS types that load via URL may require you to modify or otherwise set a base path (I’m looking at you ParticleSystemSet!) in order to get the asset to load.

HTH!

---

_[View the full topic](https://forum.babylonjs.com/t/can-i-load-a-env-file-fom-the-project-directory/43071)._
