https://github.com/wallabyjs/dotenv-quokka-plugin
https://github.com/wallabyjs/dotenv-quokka-plugin
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wallabyjs/dotenv-quokka-plugin
- Owner: wallabyjs
- Created: 2020-05-07T23:05:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-07T23:06:24.000Z (about 5 years ago)
- Last Synced: 2025-03-25T18:45:50.503Z (3 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 6
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[Quokka.js plugin](https://quokkajs.com/) to enable environment variables to be loaded from a `.env` file.
## Install
```
npm install dotenv-quokka-plugin
```Note that you may install the plugin to the [Quokka config folder](https://quokkajs.com/docs/configuration.html#global-config-file) instead of installing it to your local project.
## Configuration
Specify the plugin in Quokka [configuration settings](https://quokkajs.com/docs/configuration.html):
```
{
"plugins": ["dotenv-quokka-plugin"]
}
```By default, the plugin will load the `.env` in your project directory.
If you need to, you may change the `.env` file to load:
```
{
"plugins": ["dotenv-quokka-plugin"],
"dotenv": {
"path": ".env.test"
}
}
```Note: if the `dotenv.path` is a relative path, it will be located relative to your project directory.