{"version":"2.1.287","anchor":"hooks-modules-refuse-dynamic-import","canonical_anchor":"hooks-modules-refuse-dynamic-import","heading":"Hooks modules can no longer use dynamic import()","tier":"notice","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.287\/e\/hooks-modules-refuse-dynamic-import","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.287","markdown":"### Hooks modules can no longer use dynamic import()\n\nClaude Code now refuses a hooks module that uses import() and tells the author to use a static import declaration instead\n\n**Unclear.** It is not clear whether hooks modules themselves are generally available or limited by a switch.\n\n**What**\n\nA hooks module is a code file that defines hooks, scripts that run automatically at set points. Claude Code now refuses a hooks module that loads other files with `import()`, a way of loading code while the program is running. The message tells the author to import their own files with an import declaration at the top of the file instead, such as `import { name } from \".\/file.js\"`.\n\n**Why**\n\nA hooks module that uses `import()` will be refused, so anyone writing one needs to switch to import declarations.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5"}