Skip to content

Allow JS (and possibly also in the future CSS, SCSS) imports to resolve relative to the content bundle #12876

@bep

Description

@bep

Working on #12641 it's now (or when that is merged) already possible to include page bundled JS resources in a JS bundle built by ESBuild.

It's also possible to import CSS files, which will be bundled in a separate CSS file.

As of writing this, these CSS imports will be resolved in /assets only. But it would obviously be useful if we also could resolve relative to the content bundle itself:

content
├── _index.md
└── components
    ├── _index.md
    └── dialog
        ├── dialog.css
        ├── dialog.jsx
        └── index.md

Note to self: To get the dependency tracking working when running in server/watch mode, we cannot resolve on the file system; we need to resolve in Page.Resources.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions