caviar plugin to support .env
file.
This plugin is a sandbox plugin which only works when caviar sandbox is enabled.
$ npm i @caviar/dotenv-plugin -D
.env
SITE_HOST=https://google.com
SITE_PORT=8888
config.js
const DotEnvPlugin = require('@caviar/dotenv-plugin')
module.exports = {
caviar: {
plugins: [
new DotEnvPlugin()
],
...
},
...
}