Open dan-turner opened 1 year ago
PR submitted: https://github.com/jondot/hygen/pull/434
G'day @jondot! Any chance we could perhaps get this one in?
I published hygen-neo with fix similar to #434 (https://github.com/blikblum/hygen/commit/e8f23c610439cd14888b32a4523b8b44b6013626). It has tests and improved typing
For those searching for a temporary solution like me, you can simply leave the js
extension and add a package.json
file to the _templates
directory. It can be a very simple package.json
without "type": "module", like this:
{
"name": "package_name",
"version": "0.1.0"
}
After that, Hygen will work again in ES Module projects.
Hi team,
In addition to this related issue where
prompt.cjs
wasn't working, the same is true forindex.cjs
, which is required for projects with"type": "module"
specified in thepackage.json
We need to add
index.cjs
to thehooksfiles
variable. I will submit a PR.