Module Bundel

package.,json

{
  "name""moduletutorial",
  "version""1.0.0",
  "description""creating module",
  "main""dom.js",
  "scripts": {
    "test""echo \"Error: no test specified\" && exit 1",
    "start""webpack"
  },
  "author""",
  "license""ISC",
  "dependencies": {
    "webpack""^4.39.3",
    "webpack-cli""^3.3.8"
  }
}

webpack.config.js

var path = require("path");

module.exports = {
    entry:'./app.js',
    output: {
        path: path.resolve(__dirname),
        filename: 'main.js'
    },
    mode: 'development'
}

Comments

Popular posts from this blog

Power of async and Promise