Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: don't mark CSS files as external
When a file marked as external is imported, it's not included in the JS library bundle: the JS import is left as-is. This is desirable for regular JS dependencies such as react and maplibre-gl, but is undesirable for non-standard imports such as CSS files. Indeed, CSS imports from our JS library bundle cause pain for downstream users, because they are forced to configure their build system to support CSS imports (these aren't standard JS, e.g. webpack doesn't support this by default). Moreover, this makes it impossible to use the library without a build system (e.g. importing it directly from pure HTML/JS files). Make users responsible for including the CSS one way or another. Our stories do this using CSS imports already, but other downstream consumers might prefer to use a <link> or similar. Signed-off-by: Simon Ser <[email protected]> Fixes: 6dd85a7 ("build: fix unresolved dependencies")
- Loading branch information