Skip to content
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

Open
richtera opened this issue Nov 23, 2020 · 5 comments
Open

JSConfig or TSConfig no longer being read completely #7978

richtera opened this issue Nov 23, 2020 · 5 comments

Comments

@richtera
Copy link
Contributor

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.

@richtera
Copy link
Contributor Author

Version 0.76.5 does work correctly.

@bep
Copy link
Member

bep commented Nov 24, 2020

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?

@bep bep added this to the v0.79 milestone Nov 24, 2020
@richtera
Copy link
Contributor Author

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?

@bep
Copy link
Member

bep commented Nov 25, 2020

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

@richtera
Copy link
Contributor Author

richtera commented Nov 25, 2020

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.

@bep bep modified the milestones: v0.79, v0.80 Nov 27, 2020
@bep bep modified the milestones: v0.80, v0.81 Jan 2, 2021
@bep bep modified the milestones: v0.81, v0.82 Feb 19, 2021
@bep bep modified the milestones: v0.82, v0.83 Mar 21, 2021
@bep bep modified the milestones: v0.83, v0.84 May 1, 2021
@bep bep modified the milestones: v0.84, v0.85 Jun 18, 2021
@bep bep modified the milestones: v0.85, v0.86 Jul 5, 2021
@bep bep modified the milestones: v0.86, v0.87, v0.88 Jul 26, 2021
@bep bep modified the milestones: v0.88, v0.89 Sep 2, 2021
@bep bep modified the milestones: v0.89, v0.90 Nov 2, 2021
@bep bep removed this from the v0.90 milestone Dec 13, 2021
@bep bep modified the milestones: v0.113.0, v0.115.0 Jun 13, 2023
@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 4, 2023
@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep modified the milestones: v0.121.0, v0.122.0 Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep modified the milestones: v0.124.0, v0.125.0 Mar 4, 2024
@bep bep modified the milestones: v0.125.0, v0.126.0 Apr 23, 2024
@bep bep modified the milestones: v0.126.0, v0.127.0 May 15, 2024
@bep bep modified the milestones: v0.127.0, v0.128.0 Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants