Browse Source

Added webpack

development
Safet Purkovic 4 years ago
parent
commit
a74df0d34d
4 changed files with 14 additions and 2 deletions
  1. 2
    1
      .gitignore
  2. 2
    1
      package.json
  3. 1
    0
      src/index.js
  4. 9
    0
      webpack.config.js

+ 2
- 1
.gitignore View File

@@ -1 +1,2 @@
node_modules/
node_modules/
dist/

+ 2
- 1
package.json View File

@@ -4,7 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack"
},
"repository": {
"type": "git",

+ 1
- 0
src/index.js View File

@@ -0,0 +1 @@
console.log('hello world')

+ 9
- 0
webpack.config.js View File

@@ -0,0 +1,9 @@
const path = require("path");
module.exports = {
mode: "development",
entry: "./src/index.js",
output: {
filename: "main.js",
path: path.resolve(__dirname,"./dist")
}
}

Loading…
Cancel
Save