# كيفية طلب مكتبات خارجية في ملف مساعد للمكون؟

**URL:** <https://meta.discourse.org/t/how-to-require-external-libraries-in-a-component-helper-file/195392>\
**Category:** Development\
**Created:** [29 يونيو 2021، 6:25م UTC](https://meta.discourse.org/t/how-to-require-external-libraries-in-a-component-helper-file/195392 "2021-06-29T18:25:33Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Post date:** [3 يوليو 2021، 7:32ص UTC](https://meta.discourse.org/t/how-to-require-external-libraries-in-a-component-helper-file/195392/5 "2021-07-03T07:32:53Z")

</div>

آه، خطأ مني. كان اسم الملف خاطئًا في مجلد الأصول. لقد أصلحت المشكلة، لكنني الآن أحصل على خطأ CSP:

```md
load-script.js:35 تم رفض تحميل السكربت 
'http://localhost:4200/uploads/default/original/1X/c4a31754250cf6a40f7cbed182cfe2456d9be9fe.js' لأنه ينتهك توجيه سياسة الأمان للمحتوى التالي: 
"script-src http://localhost:4200/logs/ http://localhost:4200/sidekiq/ http://localhost:4200/mini-profiler-resources/ http://localhost:4200/assets/ http://localhost:4200/brotli_asset/ http://localhost:4200/extra-locales/ http://localhost:4200/highlight-js/ http://localhost:4200/javascripts/ http://localhost:4200/plugins/ http://localhost:4200/theme-javascripts/ http://localhost:4200/svg-sprite/ 
'unsafe-eval' http://localhost:4200/ember-cli-live-reload.js http://localhost:4200/_lr/ /uploads". لاحظ أن 'script-src-elem' لم يتم تعيينه صراحةً، لذا تم استخدام 'script-src' كحل بديل.

```

لم أرَ أنك تستخدم `extend_content_security_policy` في ملف settings.yml، لذا لا أعرف ما الذي ينقصني.

---

_[View the full topic](https://meta.discourse.org/t/how-to-require-external-libraries-in-a-component-helper-file/195392)._
