This project is a dotenv-flow-webpack plugin playground that is created for you to try out and play with the functionality of the plugin.
$ git clone https://github.com/kerimdzhanov/dotenv-flow-webpack.git
Using npm:
$ npm install
Using yarn:
$ yarn
There are basically just a few files to take a look:
-
webpack.config.js
– with a basic webpack configuration (generated with webpack scaffold) and dotenv-flow-webpack plugin integration. -
package.json
– with basic dev dependencies (including webpack and dotenv-flow-webpack plugin) and two basic build/run scripts. -
.env*
files – that contains particular environment variables to checks basic dotenv-flow's loading and overwriting behavior. -
src/index.ts
– example playground script to try out environment variables loading and tree-shaking behavior.
To run the app in development mode (that loads environment variables from a set of .env[.local]
+ .env.development[.local]
), run:
$ npm start
…or:
$ yarn start
To try out the build of app in production mode (that loads variables from a set .env[.local]
+ .env.production[.local]
appropriately), run:
$ npm build
…or:
$ yarn build
Once built, check out the dist/
folder to see how tree-shaking and environment variables replacement works.
Licensed under MIT © 2023 Dan Kerimdzhanov