Deploy Grunt on Vercel

23 views Asked by At

I have a web project automated with Grunt. When I run 'npm run grunt build', all the commands allocated in 'build' run without generating any error or warning. My page is styled with LESS and JS (both work when I open the Live Server). However, when I deploy my project on GitHub, my index.html file does not load the CSS style and, when I deploy on Vercel, the error '404: NOT_FOUND' is generated.

I think the error is in the deployment process that I did, but I don't know what specifically would be causing this error, since in vscode my page loads as programmed.

One detail that might be important is that when minifying the html from the root folder to the production folder, the code did not reduce to a single line (which I expected), instead, it was compressed and the letters turned white.

One detail that might be important is that when minifying the html from the root folder to the production folder, the code did not reduce to a single line (which I expected) and it stayed this way:

How do I correctly deploy this project with Grunt on GitHub and Vercel? What could I have done wrong?

Note: My original file is in 'src' and the other production (dist) and development (dev) folders I put inside '.gitignore' along with node_modules. So I only deployed my root folder.

This is the final command line of my build: grunt.registerTask('build', ['replace:dist', 'copy', 'imagemin', 'less:production', 'htmlmin:dist', 'uglify', 'clean']);"enter image description here

I've already tried changing the output location to 'dev', 'dist', and 'src', but the error continued. And I've already enabled directory listing, but the only folders that appeared were 'scripts' and 'styles', 'images' and 'index.html' did not appear to be able to visualize the project.

0

There are 0 answers