Custom Resource not correctly loaded by the Engine

Godot Version

4.2.2

Question

I’m creating a plugin inside my project: I have a “res.gd” file where i’m defining a custom Class that inherits Resource (so, a custom Resource), I have an “item.gd” file where i have a variable that has as the type the custom Resource, and I have the main “plugin.gd” file where I’m adding the two Classes as custom types.

Then, when I try to load the plugin:

  res://addons/anthemx/plugin.gd:10 - Parse Error: Could not resolve script "res://addons/anthemx/resources/res.gd".
  modules/gdscript/gdscript.cpp:2726 - Failed to load script "res://addons/anthemx/plugin.gd" with error "Parse error". (User)

And when I open in the Editor “item.gd” i get Could not find type "CustomResource" in the current scope.

Thanks in advance,
G.