By admin, 11 December, 2023 Add js library as "type: module" my-library: js: js/App.js: { attributes: { type: module } } Tags javascript libraries
By admin, 23 November, 2023 Attach library to custom form /** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { $form['#attached'] = [ 'library' => ['my_module/my_library'], ]; return $form; } Tags form libraries