diff --git a/yamlform.libraries.yml b/yamlform.libraries.yml
index bd9582a..fc8a995 100644
--- a/yamlform.libraries.yml
+++ b/yamlform.libraries.yml
@@ -91,12 +91,12 @@ yamlform.assets.css:
   version: 1.x
   css:
     theme:
-      //yamlform/{yamlform}/assets/css: { preprocess: false, minified: false }
+      css/yamlform.assets.css: { preprocess: false, minified: false }
 
 yamlform.assets.javascript:
   version: 1.x
   js:
-    //yamlform/{yamlform}/assets/javascript: { preprocess: false, minified: false }
+    js/yamlform.assets.js: { preprocess: false, minified: false }
   dependencies:
     - core/drupal
     - core/jquery
diff --git a/yamlform.module b/yamlform.module
index cd497a2..82f57e4 100644
--- a/yamlform.module
+++ b/yamlform.module
@@ -283,7 +283,7 @@ function yamlform_page_attachments(&$page) {
  * @see \Drupal\yamlform\YamlFormSubmissionForm::form
  */
 function yamlform_css_alter(&$css, AttachedAssetsInterface $assets) {
-  _yamlform_asset_alter($css, $assets, 'css');
+  _yamlform_asset_alter($css, $assets, 'css', 'css');
 }
 
 /**
@@ -292,7 +292,7 @@ function yamlform_css_alter(&$css, AttachedAssetsInterface $assets) {
  * @see \Drupal\yamlform\YamlFormSubmissionForm::form
  */
 function yamlform_js_alter(&$javascript, AttachedAssetsInterface $assets) {
-  _yamlform_asset_alter($javascript, $assets, 'javascript');
+  _yamlform_asset_alter($javascript, $assets, 'javascript', 'js');
 }
 
 /**
@@ -308,19 +308,26 @@ function yamlform_js_alter(&$javascript, AttachedAssetsInterface $assets) {
  *   The assets attached to the current response.
  * @param string $type
  *   The type of asset being attached.
+ * @param string $extension
+ *   The asset file extension being attached.
  */
-function _yamlform_asset_alter(array &$items, AttachedAssetsInterface $assets, $type) {
+function _yamlform_asset_alter(array &$items, AttachedAssetsInterface $assets, $type, $extension) {
   $settings = $assets->getSettings();
-  if (!empty($settings['yamlform']['assets'][$type])) {
-    foreach ($settings['yamlform']['assets'][$type] as $id => $hash) {
-      $items["yamlform/$id/assets/javascript"] = [
+  if (empty($settings['yamlform']['assets'][$type])) {
+    return;
+  }
+
+  $path = drupal_get_path('module', 'yamlform');
+  foreach ($settings['yamlform']['assets'][$type] as $id => $hash) {
+    $key = "$path/$extension/yamlform.assets.$extension";
+    if (isset($items[$key])) {
+      $items[$key] = [
         'data' => base_path() . "yamlform/$id/assets/$type?v=$hash",
         'group' => 1000,
         'weight' => 1000,
-      ] + $items["//yamlform/{yamlform}/assets/$type"];
+      ] + $items[$key];
     }
   }
-  unset($items["//yamlform/{yamlform}/assets/$type"]);
 }
 
 /**
