Missing main.js in production mode

I compiled a production version of my theme with “gulp --production”. so i have new files in my dist folder. everything is fine. wordpress loads the new main.css which is now dist/styles/main-a5886f15.css
there is also a new main.js which is dist/scripts/main-3af671da.js
But wordpress still expects dist/scripts/main.js
Why? When i take a look in assets.json, the main.js is missing:

  "main.css": "main-a5886f15.css",
  "editor-style.css": "editor-style-5a97b810.css"

what is wrong?
i added main.js by hand now and then it works:

  "main.css": "main-a5886f15.css",
  "editor-style.css": "editor-style-5a97b810.css",
  "main.js": "main-3af671da.js"

but i am sure this can’t be the right solution?!

See https://github.com/roots/sage/issues/1398

Here’s the fix: https://github.com/roots/sage/commit/39caa2d391fb4d0fb0e8894517de259bcd6cc5ec

1 Like