Output.filename not found

Output.filename not found
0

#1

webpack.config.js

const path = require('path');
module.export={
entry:'./src/app.js',
output:{
  path:path.join(__dirname,'public'),
  filename:"bundle.js"
}
};

package.json


{
  "name": "webpackreact",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "serve": "live-server public/",
    "build-babel": "babel src/app.js --out-file=public/scripts/app.js --presets=env,react --watch",
    "build":"webpack --watch"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "babel-cli": "6.24.1",
    "babel-preset-env": "1.5.2",
    "babel-preset-react": "6.24.1",
    "live-server": "^1.2.0",
    "webpack": "3.1.0"
  }
}

ERROR:

how to resolve this?


#2

You have a syntax error. It should be:

module.exports

You missed the ‘s’.

Since the export is failing , this error is being thrown as per my knowledge.


#3

oh man !!!
you saved my life tysm
wasted so much time on this


#4

I understand the pain.

glad to be of help. :wink: