The setting of the (output filename option for help in Webpack is not valid)

when I packaged with webpack version 4.0 or later, I found that when I specified filename, in the output option of webpack.config.js, the result was always main.js,. Why? Is there any divine guidance?
the following drawings and code:

//webpack.config.js
var path = require("path")
module.export = {
    entry: path.resolve(__dirname, "./index.js"),
    output: {
        path: path.resolve(__dirname, "./dist"),
        filename: ".js/bundle.[name].[hash].js"
    }
}
//package.json
{
  "name": "webpack-practice-singlepage",
  "version": "1.0.0",
  "description": "this project is for spa practice",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "webpack --mode=development",
    "build": "webpack --mode=production"
  },
  "author": "Manfray",
  "license": "ISC",
  "devDependencies": {
    "webpack": "^4.5.0",
    "webpack-cli": "^2.0.14"
  }
}

then after I npm run dev, dist dist/main.js

is generated in the project directory.

then why didn"t my filename work?

Mar.02,2021

filename: '.js/bundle.[name].[hash].js'

filename: 'bundle.[name].[hash].js'

means that module.export misspelled
should be module.exports


you need to put webpack.config.js in the root directory of the project, and then, after packing it again, I also encounter this problem, and there will be no problem to release it.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b611-2c293.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b611-2c293.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?