Browse Source

Video 2: webpack.config.js entry, output.filename.

Frederic G. MARAND 4 years ago
parent
commit
7cb82aaab0
5 changed files with 21 additions and 1 deletions
  1. 6 0
      .idea/vcs.xml
  2. 3 1
      package.json
  3. 1 0
      src/index.js
  4. 6 0
      webpack.config.js
  5. 5 0
      yarn.lock

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 3 - 1
package.json

@@ -1,6 +1,7 @@
 {
   "author": "Sean Larkin <sean.larkin@cuw.edu>",
   "devDependencies": {
+    "prettier": "^1.19.1",
     "webpack": "^3.1.0",
     "webpack-cli": "^3.3.10"
   },
@@ -8,7 +9,8 @@
   "main": "index.js",
   "name": "webpack-academy-one",
   "scripts": {
-    "build": "webpack"
+    "build": "webpack",
+    "run": "node bundle.js"
   },
   "version": "1.0.0"
 }

+ 1 - 0
src/index.js

@@ -0,0 +1 @@
+console.log("Hello from webpack academy");

+ 6 - 0
webpack.config.js

@@ -0,0 +1,6 @@
+module.exports = {
+  entry: "./src/index.js",
+  output: {
+    filename: "bundle.js"
+  }
+};

+ 5 - 0
yarn.lock

@@ -1824,6 +1824,11 @@ posix-character-classes@^0.1.0:
   resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
   integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
 
+prettier@^1.19.1:
+  version "1.19.1"
+  resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
+  integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
+
 process-nextick-args@~2.0.0:
   version "2.0.1"
   resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"