-
Notifications
You must be signed in to change notification settings - Fork 0
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
Is it server-side only? #1
Comments
Hi, yes, for now, the DICC runtime is server-side only due to depending on |
Yes, it would be great. I am now using a webpack plugin that patched dicc.js which is not something good to have. I'd even start using dicc inside dicc to describe all its dependencies and expose them for replacement publicly (sort of dogfooding pattern). |
Hi, sorry for the delay, I've been busy rewriting the DICC compiler basically from scratch lol, anyway check out v1.0.0-rc.0 of both packages - the runtime package now externalises the |
The config stopped working: project: './tsconfig.json'
containers:
src/service-provider.ts:
className: 'ServiceProvider'
typeCheck: true
resources:
src/services/*.ts: ~
src/components/*.ts:
exclude:
- src/components/component-template.ts Configuration error: Invalid config: [
{
"code": "unrecognized_keys",
"keys": [
"exclude"
],
"path": [
"containers",
"src/service-provider.ts",
"resources",
"src/components/*.ts"
],
"message": "Unrecognized key(s) in object: 'exclude'"
},
{
"code": "unrecognized_keys",
"keys": [
"typeCheck"
],
"path": [
"containers",
"src/service-provider.ts"
],
"message": "Unrecognized key(s) in object: 'typeCheck'"
}
] |
Ouch, sorry, not a very helpful error message.. The config schema changed a bit in the new version:
I'm off to bed for now, it's almost 3am here, I'll look into the other issues more tomorrow! |
Something else is changed:
Seems it tries to scan more folders than expected |
Well it means you must've exported something that the resource scanner followed to the mentioned file. The resource scanner picks up everything you export from any resource file which matches the resource pattern and then follows some of those exports further - e.g. namespaces, object literals etc. So apparently you're exporting (or re-exporting) something somewhere that the resource scanner follows to the Edit: weird thing is, the |
Yes, I am testing it there in the main branch. The prev. version works fine. It is proved by github actions build. I will try to understand why the thing happens. I felt like dicc started to scan the whole modules folder as it started to work significantly longer than before. |
That shouldn't happen.. I'm literally just passing the resource patterns that you specify in |
Actually, could you first push your latest code? The repo looks out of date, at least the |
Yes because I don't want to push something that doesn't work yet. The config I use to try rc version is here above. So I use that config and do |
I have successfully compiled a container but once I start using it, I get the following:
That's my generated container:
Then I inspected this
dicc
module and found this https://github.com/cdn77/dicc/blob/main/core/dicc/src/container.ts#L1C10-L1C27. Is there any fix for that for browsers?P.S. I am now using just a mock like this and features work (constructors only):
The text was updated successfully, but these errors were encountered: