Description
|
- `exclude`: An array of globs specifying files that should not be part of the |
It looks like an array of globs is the only description for the format of the exclude field in typst.toml.
This ambiguity cause problems.
QuadnucYard/ourchat-typ#3 is an example.
This package has the following file structure.
/typst.toml
/assets/ (to be excluded)
/src/
/src/assets/ (to be included)
The package specifies ./assets, but surprisingly, it matches both /assets/ and /src/assets/.
Analysis
The bundler trims the ./ prefix, and uses a library for .gitignore to parse the glob.
As a result, ./assets becomes assets, and matches recursively.
|
let exclusion = exclusion.trim_start_matches("./"); |
(introduced in
b41d483)
Workaround
Use /assets.
(not confirmed yet)
Confirmed with https://github.com/typst-community/dev-builds/releases/tag/packages-bundler-main.2025-12-10.8c2f3eb.
Links
Discord
Description
packages/docs/manifest.md
Line 68 in 8785ec6
It looks like an array of globs is the only description for the format of the
excludefield intypst.toml.This ambiguity cause problems.
QuadnucYard/ourchat-typ#3 is an example.
This package has the following file structure.
/typst.toml/assets/(to be excluded)/src//src/assets/(to be included)The package specifies
./assets, but surprisingly, it matches both/assets/and/src/assets/.Analysis
The bundler trims the
./prefix, and uses a library for.gitignoreto parse the glob.As a result,
./assetsbecomesassets, and matches recursively.packages/bundler/src/main.rs
Line 336 in 8785ec6
(introduced in b41d483)
Workaround
Use
/assets.(not confirmed yet)Confirmed with https://github.com/typst-community/dev-builds/releases/tag/packages-bundler-main.2025-12-10.8c2f3eb.
Links
Discord