Hugo 0.75 comes with a new “hugo mod npm pack” command, several improvements re. Hugo Modules and the Node tools, and more.
September 14, 2020
Go to Hugo Releases for the release downloads.
The new CLI command is called
hugo mod npm pack. We have marked it as experimental. It works great, go ahead and use it, but we need to test this out in real projects to get a feel of it; it is likely that it will change/improve in the upcoming versions of Hugo. The command creates a consolidated
package.jsonfrom the project and all of its theme components. On version conflicts, the version closest to the project is selected. We may revise that strategy in the future (minimal version selection maybe?), but this should give both control and the least amount of surprise for the site owner.