Skip to content

@/CivicSignalBlog - Implicit imports not working for Subpath Import Aliases  #904

Open
@m453h

Description

@m453h

As described in PR #902

This is a minor issue and shouldn't be a blocker, but it would be nice to address, so it’s worth exploring.

After switching to Subpath Import Aliases, we are currently required to explicitly include the filename in all our imports, even when an index.js file is present. As a result, you may encounter imports like:

import slug from "#civicsignalblog/payload/fields/slug/index";

Instead of

import slug from "#civicsignalblog/payload/fields/slug";

It would be much better if we can find a clean and reusable way to automatically resolve index.js file from our import paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreA task that needs to be done (neither enhancement or bug)

    Type

    No type

    Projects

    Status

    🆕 Icebox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions