const path = require("path"); // NodeJS builtin. // Export a function returning config instead of a static config. // The purpose is to allow use of the environment. module.exports = env => { console.log(env); return { entry: "./src/", output: { filename: "bundle.js", path: path.join(__dirname, "dist") // path must be absolute. } }; };