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

Not completely working #1

Open
jbjanot opened this issue Mar 27, 2024 · 2 comments
Open

Not completely working #1

jbjanot opened this issue Mar 27, 2024 · 2 comments

Comments

@jbjanot
Copy link

jbjanot commented Mar 27, 2024

Hey there! Thanks for writing this plugin.

It is partially working, as ESBuild does not return any error when I use it on this kind of syntax :

import 'core/*/js/__*.js';
import 'components/*/*/js/__*.js';
import 'flexibles/*/js/__*.js';

But my files are still not loaded.
They are auto instanced classes that looks like that:

export default new class {
	constructor() {
		console.log( 'hello you' );
	}
};

When I try to debug it this way:

import cores from 'core/*/js/__*.js';
console.log(cores);

I get an infinite object with each part of the path, never seeing the expected class.

image

Any idea what could be causing it?

Thanks a lot for your help!

@jbjanot jbjanot changed the title Not working Not completely working Mar 27, 2024
@whaaaley
Copy link
Owner

Thanks for reporting this! I'll definitely look into it. If you've made any headway keep me updated. I've had a next branch with quite a few updates that I never quite wrapped up last year that may have covered this. I'll try to set up some unit tests and see where I'm at.

@jbjanot
Copy link
Author

jbjanot commented Mar 30, 2024

Hey Dustin, thanks for your comment.
I did fork it here: https://github.com/lesanimals/esbuild-plugin-glob-import

It works for my use case, but I didn't particularly tested it, and it is the first time I have a look at esbuild plugins.
If it can be of any help to you, I'll be more than happy!

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants