Home
Support Forums

What's wrong with my config file?

This is the address I am distributing now.
https://cats-album.netlify.app
This is my wbpack.config.js
When deploying, I get the following error:

Failed to load resource: the server responded with a status of 404 ()
index.js:1 Failed to load resource: the server responded with a status of 404 ()
bundle.js:532 Uncaught ReferenceError: regeneratorRuntime is not defined
at bundle.js:532
at Array.webpack_modules (bundle.js:572)
at webpack_require (bundle.js:595)
at Array. (bundle.js:16)
at webpack_require (bundle.js:595)
at bundle.js:635
at bundle.js:638
at bundle.js:640
style.css:1 Failed to load resource: the server responded with a status of 404 ()

What do I need to fix?

You’ve set your publish directory to dist:

Are you copying all your assets to that folder before deploying?

Thanks for the reply.
Yes!!!I put all the images in the dist folder and now the images come out fine. But still the style.css file is not loaded. But style.css is under dist folder.


Can you figure out what the problem is?

I’m not seeing the CSS file in your repo:

Um…style.css is not created…
But how do I know if a folder is created in the deployed resource??

You can run npm run build locally and see what all gets exported in the dist folder. Same thing would happen on Netlify too.

You already have the files in the repo, except they need to be inside the dist folder while deploying.

If styles.css does not exist in the dist folder when npm run build is done locally, are you saying that it will not be created when deploying in netlify as well?
I’m not sure if my understanding is correct. :sob:

Yes, that is correct. You need to copy that file in dist folder when you run npm run build.

Thank’s very kind of you.
Then, I am check my webpack.config.js!

1 Like