JavaScriptã«ã¯ãimport * as ã¨ããæ§æãããã¾ããããã¯ãã¤ã³ãã¼ãå
ã®ã¢ã¸ã¥ã¼ã«ã®ä¸èº«å
¨é¨ããªãã¸ã§ã¯ãï¼ã¢ã¸ã¥ã¼ã«åå空éãªãã¸ã§ã¯ãï¼ã¨ãã¦åå¾ã§ããæ§æã§ãã import * as mod from "./some-module"; console.log(mod.foo, mod.bar); ãã¾ã«ãããã®æ§æã使ãã¨Tree Shakingãå¹ããªããªããã¨ãã£ã説æãè¦ããããã¨ãããã¾ãããå¿
ãããããã§ã¯ããã¾ãããããã§ããã®è¨äºã§ã¯import * asæ§æã¨ããã©ã¼ãã³ã¹æé©åã«é¢é£ããæ£ããç¥èã¨ããã®èæ¯ããç´¹ä»ãã¾ãã webpackã§æ¤è¨¼ãã¦ã¿ãã Tree shakingãè¡ãã®ã¯ã¢ã¸ã¥ã¼ã«ãã³ãã©ã§ãããã¨ãç¥ããã¦ãã¾ããããã§ãwebpackã使ã£ã¦è²ã
ã¨æ§æãæ¤è¨¼ãã¦ã¿ã¾ããããä»åã¯æ¬¡ã®ãããªè¨å®ãç¨ãã¾ããããã¯æé©åã
{{#tags}}- {{label}}
{{/tags}}