'vendor.js' not being generated (fresh install)


I have a fresh installation of Sage 10 but I’m getting a 404 on vendor.js from the get-go,

I’ve noticed on Github that there were some commits pushed around 10 days ago and things have changed a bit.

This is all I did:

composer create-project roots/sage (theme-name) dev-master
(If I don’t use dev-master Sage 9 gets installed. This is normal, right?).

composer update


yarn start

I tried nvm use versions:

  • 12.18.3
  • 14.15.4

Webpack versions 4.

Any help would be really appreciated.

Thank you!

1 Like

I’ve run into this before myself, I don’t think it causes any serious issues, but you can clean up the output with the asset()->exists conditional:

Hi @jamesfacts

Thank you so much for your reply!

Yes I had seen that thread but to be honest I’m a bit of a stickler and this vendor issues started after there was an update in the repo.

I’m no guru, but isn’t the vendor.js necessary to load various parts as needed? Wouldn’t getting rid of it slow down the performance in the long run?

I can’t diagnose anything (or don’t know how) because there is no error generated anywhere during compilation; I just see the 404 in the console when browsing the website.

The vendor.js file is generated by the extract() method in the mix config, which performs vendor extraction:

If you intend to make frequent updates to your application’s JavaScript, you should consider extracting all of your vendor libraries into their own file. This way, a change to your application code will not affect the caching of your large vendor.js file.

Since Sage’s default mix config doesn’t appear to extract any files, then it probably isn’t generating a vendor.js:

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.