Problem with webpack import

I’ve updated webpack and other packages so my package.json is now:

{
  "repository": {},
  "license": "MIT",
  "scripts": {
    "deploy": "webpack --mode production",
    "watch": "webpack --mode development --watch"
  },
  "dependencies": {
    "phoenix": "file:../deps/phoenix",
    "phoenix_html": "file:../deps/phoenix_html"
  },
  "devDependencies": {
    "@babel/core": "^7.6.0",
    "@babel/preset-env": "^7.6.0",
    "babel-loader": "^8.0.0",
    "copy-webpack-plugin": "^4.5.0",
    "css-loader": "^3.2.0",
    "mini-css-extract-plugin": "^0.4.0",
    "optimize-css-assets-webpack-plugin": "^5.0.3",
    "uglifyjs-webpack-plugin": "^1.2.4",
    "webpack": "^4.39.3",
    "webpack-cli": "^3.3.8"
  }
}

and now I noticed that it only loads app.js correctly when I already have mix phx.server running and I updated chat.js, after that the issue remains

Tried to load files into a in the template instead of depending on webpack (app.js) but I don’t know how to get the phoenix module that socket.js needs if anyone knows that would help