From 156d23f72325112288e870de737d69341293527f Mon Sep 17 00:00:00 2001 From: jaymeandretta <43808639+jaymeandretta@users.noreply.github.com> Date: Wed, 29 Mar 2023 10:21:33 -0300 Subject: [PATCH] Update javascript-modules.md Correcting typo --- markdown/en/book/appendix/javascript-modules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/en/book/appendix/javascript-modules.md b/markdown/en/book/appendix/javascript-modules.md index bef89c2..35bb28d 100644 --- a/markdown/en/book/appendix/javascript-modules.md +++ b/markdown/en/book/appendix/javascript-modules.md @@ -415,7 +415,7 @@ We'll finish up this chapter with a brief look at [**dynamic imports**](https:// **Static imports use the `import` statement, while dynamic imports use the `import()` function.** -With dynamic imports you can optionally load a module during the execution of your code. This might be useful, for example, if you want to create an app that can load any of the [thirty or so 3D asset formats that three.js supports](https://github.com/mrdoob/three.js/tree/master/examples/jsm/loaders) (there are more than thirty loaders there, but some are for textures and other things). Altogether, these loaders comprise around one megabyte of JavaScript, which is a lot to force upon a poor user if they only need a fraction of it. Instead, you can wait until the user sends you a model file, examine the file and say, "_ayup, that there's an FBX file, better be fetchin' tha `FBXLoader`_": +With dynamic imports you can optionally load a module during the execution of your code. This might be useful, for example, if you want to create an app that can load any of the [thirty or so 3D asset formats that three.js supports](https://github.com/mrdoob/three.js/tree/master/examples/jsm/loaders) (there are more than thirty loaders there, but some are for textures and other things). Altogether, these loaders comprise around one megabyte of JavaScript, which is a lot to force upon a poor user if they only need a fraction of it. Instead, you can wait until the user sends you a model file, examine the file and say, "_ayup, that there's an FBX file, better be fetchin' that `FBXLoader`_": {{< code lang="js" linenos="false" hl_lines="" caption="Dynamically importing the FBXLoader at run time" >}}