Parcel: How to use parcel.js with `hugo` static site generator - https://gohugo.io/

Created on 3 Jul 2018  ยท  7Comments  ยท  Source: parcel-bundler/parcel

โ” Question

How to use parcel.js with hugo static site generator

๐Ÿ”ฆ Context

i have website in hugo, i want to use parcel.js please provide guideline ?

๐ŸŒ Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Hugo | https://gohugo.io/ - v0.42.2 |

Question Stale

Most helpful comment

actually hugo is not compress multiple css files in one, or any js file, i want to build ci on top of hugo after hugo build, i also want to remove, unwanted css & js code using tree shacking algorithm, that's why i have placed this question, and thank you for your response

All 7 comments

What is it exactly you want to accomplish?

Hugo is an excellent tool by default and doesn't really require another build tool like parcel.

actually hugo is not compress multiple css files in one, or any js file, i want to build ci on top of hugo after hugo build, i also want to remove, unwanted css & js code using tree shacking algorithm, that's why i have placed this question, and thank you for your response

For development:

  • Make sure Hugo runs without creating a server.
  • In one terminal run Hugo in watch mode
  • Run parcel serve public/*.html in another terminal.

For production:

  • Run Hugo
  • Run parcel build public/*.html

Notes

Hugo uses the public folder for outputting files. The posts are exported as html files

i have tried but not working

Server running at http://localhost:1234 
๐Ÿšจ  Cannot find module '/Users/tapan/Desktop/new_theme/demo.gitlab.io/index.html' from '/Users/tapan/Desktop/new_theme/demo.gitlab.io'
    at Resolver.resolve (/usr/local/lib/node_modules/parcel-bundler/src/Resolver.js:70:17)
    at <anonymous>

And with ./public/*.html?

same error i got @KeineLimonade

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

Was this page helpful?
0 / 5 - 0 ratings