Answers.Body: <p>It does in fact need to be loaded on every request, because otherwise your <code>EVENT_REGISTER_FIELD_TYPES</code> event listener wouldn’t get registered, which is responsible for telling Craft that the field type exists.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-17T22:05:04.980Z
Answers.Text: This makes sense, thanks for the feedback. Is there a rule of thumb on when it's save to not put the module in the `bootstrap`-array?
Answers.UserDisplayName: Lukas Knuth
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-17T23:56:04.467Z
Answers.Text: Yeah, when your module isn’t doing anything special in `init()`.
Answers.UserDisplayName: Brandon Kelly
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-19T14:19:47.253Z
Answers.Text: "special" meaning not registering anything via `Event`?
Answers.UserDisplayName: Lukas Knuth
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-19T18:06:44.160Z
Answers.Text: That’s one example, yes.
Answers.UserDisplayName: Brandon Kelly
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-16T16:18:02.003Z
Answers.LastActivityDate: 2019-06-16T16:18:02.003Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>I'm expanding my Craft website with a small Module, internal to this project. The module currently only defines a new input-field (extending <code>craft\base\Field</code>).</p>
  
  <p>I have dumped the autoloader from composer and my <code>config/app.php</code> only contains the registration of this module:</p>
  
  <pre><code>&lt;?php
  return [
      'modules' =&gt; [
          'simple-markdown-editor' =&gt; [
              'class' =&gt; \codeisland\simplemde\MarkdownModule::class,
          ],
      ],
      'bootstrap' =&gt; ['simple-markdown-editor'],
  ];
  </code></pre>
  
  <p>This setup works and the new field shows up in the Admin CP. <strong>But</strong>: as far as I understand the <code>bootstrap</code>-entry, it's only needed if the module needs to be executed on <em>every page render</em>. The <a href="https://docs.craftcms.com/v3/extend/module-guide.html#update-the-application-config" rel="nofollow noreferrer">Craft documentation</a> says as much:</p>
  
  <blockquote>
    <p>TIP: If your module doesn’t need to get loaded on every request, you can remove its ID from the bootstrap array.</p>
  </blockquote>
  
  <p>Since the module only defines an input-field for the Admin CP, it doesn't need to be loaded on every request. But if I remove it from the <code>bootstrap</code>-array, it's not loaded at all.</p>
  
  <p>Do I need to add additional config? Or am I just misunderstanding the documentation?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-15T16:20:20.127Z
Comments.Text: I’ve experienced this too. Curious to know if this is a bug, a documentation error, or if there is some legitimate workaround.
Comments.UserDisplayName: Lindsey D
Tags: <modules>
Title: Module not loading unless bootstrapped
ThreadText: # Module not loading unless bootstrapped
  
  (Asked by: username_0 on 2019-06-15)
  
  I'm expanding my Craft website with a small Module, internal to this project. The module currently only defines a new input-field (extending `craft\base\Field`).
  
  I have dumped the autoloader from composer and my `config/app.php` only contains the registration of this module:
  
  ```
  <?php
  return [
      'modules' => [
          'simple-markdown-editor' => [
              'class' => \codeisland\simplemde\MarkdownModule::class,
          ],
      ],
      'bootstrap' => ['simple-markdown-editor'],
  ];
  
  ```
  
  This setup works and the new field shows up in the Admin CP. **But**: as far as I understand the `bootstrap`-entry, it's only needed if the module needs to be executed on *every page render*. The [Craft documentation](https://docs.craftcms.com/v3/extend/module-guide.html#update-the-application-config) says as much:
  
  > TIP: If your module doesn’t need to get loaded on every request, you can remove its ID from the bootstrap array.
  
  Since the module only defines an input-field for the Admin CP, it doesn't need to be loaded on every request. But if I remove it from the `bootstrap`-array, it's not loaded at all.
  
  Do I need to add additional config? Or am I just misunderstanding the documentation?
  
  **Tags:** modules
  
  > **Comments:**
  > **username_1**: I’ve experienced this too. Curious to know if this is a bug, a documentation error, or if there is some legitimate workaround.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-06-16. Score: 2
  
  It does in fact need to be loaded on every request, because otherwise your `EVENT_REGISTER_FIELD_TYPES` event listener wouldn’t get registered, which is responsible for telling Craft that the field type exists.
  
  > **Comments:**
  > **username_0**: This makes sense, thanks for the feedback. Is there a rule of thumb on when it's save to not put the module in the `bootstrap`-array?  
  > **username_2**: Yeah, when your module isn’t doing anything special in `init()`.  
  > **username_0**: "special" meaning not registering anything via `Event`?  
  > **username_2**: That’s one example, yes.  
  
  ---
  
  