Skip to content

Instantly share code, notes, and snippets.

@0x1ad2
Last active April 22, 2020 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x1ad2/bae93bd0f15d7f54f54fa019edcc2609 to your computer and use it in GitHub Desktop.
Save 0x1ad2/bae93bd0f15d7f54f54fa019edcc2609 to your computer and use it in GitHub Desktop.
require("dotenv").config();
const path = require("path");
const Dotenv = require("dotenv-webpack");
module.exports = {
webpack: config => {
config.plugins = config.plugins || [];
config.plugins = [
...config.plugins,
new Dotenv({
path: path.join(__dirname, ".env"),
systemvars: true
})
];
return config;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment