Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
feat: use webpack dotenv plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
  • Loading branch information
mikemurray committed Mar 31, 2020
1 parent 93db5ae commit 59615e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package/config/webpack.common.js
Expand Up @@ -2,6 +2,7 @@ const fs = require("fs");
const path = require("path");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const HtmlWebPackPlugin = require("html-webpack-plugin");
const Dotenv = require("dotenv-webpack");

// We set this in the `build:modules` package.json script
const esmodules = process.env.BABEL_MODULES === "1";
Expand Down Expand Up @@ -86,6 +87,9 @@ module.exports = {
]
},
plugins: [
new Dotenv({
path: resolveApp(".env")
}),
new CleanWebpackPlugin(),
new HtmlWebPackPlugin({
template: "./src/index.html"
Expand Down

0 comments on commit 59615e3

Please sign in to comment.