-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSConfig or TSConfig no longer being read completely #7978
Comments
Version 0.76.5 does work correctly. |
So, the 0.78.1 added a custom resolver for files in /assets. Can you elaborate what you mean by "not working"? Is it folder mapping and are you sure you need it? |
The old version would look for tsconfig and jsconfig files closest to the current js file and include it in the resolver. Ideally it should use all of them but now it only uses the one at the root which do doesn't allow different config files for each theme module. The branch I had would look for those files and then recreate a new file with all the aliases in it. This was not a great solution either because it was rather complicated. Maybe I didn't understand how the new resolver is configured or used. Is it just using relative imports? |
It should be described here: https://gohugo.io/hugo-pipes/js/ As I said before, since a module can (and will) live at any location on the disk and is read-only and will be reused across projects etc., the current implementation was the one that made most sense to me. Have a look at this test project: https://github.com/gohugoio/hugoTestProjectJSModImports Also see #7966 |
Yes definitely read-only modules. But the module previously could have a jsconfig.json file inside of the asset folder now they are no longer being read. But the workaround might be to use the new naming and not rely on jsconfig. It just affects old modules in my case. |
Hugo Static Site Generator v0.78.1/extended linux/amd64 BuildDate: unknown
My older build which rely on multiple jsconfig.json files in each assets/js folder don't seem to be working anymore.
I just tried to build an old build with the new hugo and it's not working. It seems weird, because the standard command line ESBuild still works and resolves my jsconfig files.
The text was updated successfully, but these errors were encountered: