How to include a CI template by a LOCAL RELATIVE path?

We have a repo with some shared CI templates. And say we have two files there:

.config.yml:

.node:
  image: path_to_image

npm_build.yml

include: .config.yml
npm_build:
  image: !reference [.node, image]
  tags: [docker, kvm]
  # ...

Then in a project we use it:

.gitlab-ci.yml

include:
  - project: 'ci_templates'
    file: 'npm_build.yml'
    ref: 'master'

# ...

And it seems like this basic setup is not gonna work, as the local include inside npm_build.yml would search for .config.yml inside the project directory, instead of its own directory. So there seem to be no way to reference local files actually using relative paths, isn’t it?

The only workaround I observe now is to reference neighboring files using absolute paths, e.g.:

npm_build.yml

include:
  - project: 'ci_templates'
    file: '.config.yml'
    ref: 'master'

npm_build:
# ...

It has to be so ugly? No way to build a library with reusable parts?