From 41945e168d77043f0b9aebb155e7e9a95e90d5a6 Mon Sep 17 00:00:00 2001 From: Feihong Hsu Date: Tue, 2 Jan 2024 13:06:18 -0600 Subject: [PATCH] Replace 'official' with 'more reliable'... ...when comparing `mel.raw` with `external` for importing frontend assets --- docs/styling-with-css/index.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/styling-with-css/index.md b/docs/styling-with-css/index.md index 7fce426e..dd8ecaf9 100644 --- a/docs/styling-with-css/index.md +++ b/docs/styling-with-css/index.md @@ -132,12 +132,11 @@ Finally, add a `mel.raw` extension node at the top of `Order.re`: This solution works well for our current build configuration, but falls apart if we change the `module_systems` field of the `melange.emit` stanza from `es6` to -`commonjs`. This results in a subtle runtime error caused by the fact -that CommonJS uses `require` instead of `import` to import modules. +`commonjs`. This results in a subtle runtime error caused by CommonJS needing +`require` instead of `import` to import modules. The `mel.raw` extension node is unsafe, but it is still useful for prototyping. -Fortunately, Melange provides an official and more reliable way to import -frontend assets. +Fortunately, Melange provides a more reliable way to import frontend assets. ## Import using `external`