Browse Source

Video 3: output.path

Frederic G. MARAND 4 years ago
parent
commit
f5d44e44ef
2 changed files with 5 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 4 1
      webpack.config.js

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 .idea/workspace.xml
 
+build
 node_modules

+ 4 - 1
webpack.config.js

@@ -1,6 +1,9 @@
+const path = require("path"); // NodeJS builtin.
+
 module.exports = {
   entry: "./src/index.js",
   output: {
-    filename: "bundle.js"
+    filename: "bundle.js",
+    path: path.join(__dirname, "build") // path must be absolute.
   }
 };