اذهب إلى المحتوى
  • 0

خطأ polyfill الخاص بwebpack

Aisha Zaki

السؤال

ظهر لدي خطأ التالي :

Webpack <5 used to include polyfills for node. js core modules by default. This is no longer the case. Verity if you need this module and configure apolyfill for it. ويطلب مني اضافه عده قواعد لwebpack. config. js وتنزيل ما يلزمها ك

 crypto-browersify و buffer و https وغيرها 

او اختيار القيمه  false لجميع القواعد 

ماذا يجب افعل لحل المشكله وما هو عملpolyfill من الاساس 

وشكرا 

رابط هذا التعليق
شارك على الشبكات الإجتماعية

Recommended Posts

  • 1
بتاريخ 22 دقائق مضت قال Aisha Zaki:

حاولي أن تضعي هذا السطر في الكائن module.exports

    target: 'node',

هذا هو الملف بعد التعديل
webpack.config.js

ثم قومي بتشغيل الأمر

npm run build

 

رابط هذا التعليق
شارك على الشبكات الإجتماعية

  • 0
بتاريخ On 9‏/6‏/2021 at 16:07 قال محمد أبو عواد:

حاولي أن تضعي هذا السطر في الكائن module.exports


    target: 'node',

هذا هو الملف بعد التعديل
webpack.config.js

ثم قومي بتشغيل الأمر


npm run build

 

ماذا عن التنبيهات.. فهى تسبب خلل في تنسيقات الصفحه ما الحل؟ 

WARNING in ./node_modules/browserslist/node.js 161:18-66

Critical dependency: the request of a dependency is an expression

 @ ./node_modules/browserslist/index.js 8:10-27

 @ ./node_modules/webpack/lib/config/browserslistTargetHandler.js 8:21-44      

 @ ./node_modules/webpack/lib/config/target.js 11:1-39

 @ ./node_modules/webpack/lib/config/defaults.js 16:4-23

 @ ./node_modules/webpack/lib/index.js 328:10-66

 @ ./src/index.js 14:0-35

 

WARNING in ./node_modules/browserslist/node.js 161:26-33

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

 @ ./node_modules/browserslist/index.js 8:10-27

 @ ./node_modules/webpack/lib/config/browserslistTargetHandler.js 8:21-44      

 @ ./node_modules/webpack/lib/config/target.js 11:1-39

 @ ./node_modules/webpack/lib/config/defaults.js 16:4-23

 @ ./node_modules/webpack/lib/index.js 328:10-66

 @ ./src/index.js 14:0-35

 

WARNING in ./node_modules/browserslist/node.js 181:16-186:5

Critical dependency: the request of a dependency is an expression

 @ ./node_modules/browserslist/index.js 8:10-27

 @ ./node_modules/webpack/lib/config/browserslistTargetHandler.js 8:21-44      

 @ ./node_modules/webpack/lib/config/target.js 11:1-39

 @ ./node_modules/webpack/lib/config/defaults.js 16:4-23

 @ ./node_modules/webpack/lib/index.js 328:10-66

 @ ./src/index.js 14:0-35

 

WARNING in ./node_modules/browserslist/node.js 182:6-13

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

 @ ./node_modules/browserslist/index.js 8:10-27

 @ ./node_modules/webpack/lib/config/browserslistTargetHandler.js 8:21-44      

 @ ./node_modules/webpack/lib/config/target.js 11:1-39

 @ ./node_modules/webpack/lib/config/defaults.js 16:4-23

 @ ./node_modules/webpack/lib/index.js 328:10-66

 @ ./src/index.js 14:0-35

 

WARNING in ./node_modules/jest-worker/build/base/BaseWorkerPool.js 119:19-46   

Critical dependency: the request of a dependency is an expression

 @ ./node_modules/jest-worker/build/WorkerPool.js 8:45-77

 @ ./node_modules/jest-worker/build/index.js 38:41-64

 @ ./node_modules/terser-webpack-plugin/dist/index.js 22:18-40

 @ ./node_modules/terser-webpack-plugin/dist/cjs.js 3:15-33

 @ ./node_modules/webpack/lib/config/defaults.js 952:25-57

 @ ./node_modules/webpack/lib/index.js 328:10-66

 @ ./src/index.js 14:0-35

 

WARNING in ./node_modules/jest-worker/build/index.js 68:19-38

Critical dependency: the request of a dependency is an expression

 @ ./node_modules/terser-webpack-plugin/dist/index.js 22:18-40

 @ ./node_modules/terser-webpack-plugin/dist/cjs.js 3:15-33

 @ ./node_modules/webpack/lib/config/defaults.js 952:25-57

 @ ./node_modules/webpack/lib/index.js 328:10-66

 @ ./src/index.js 14:0-35

 

WARNING in ./node_modules/jest-worker/build/workers/processChild.js 97:15-28   

Critical dependency: the request of a dependency is an expression

 @ ./node_modules/jest-worker/build/workers/ChildProcessWorker.js 142:6-39     

 @ ./node_modules/jest-worker/build/WorkerPool.js 41:15-62

 @ ./node_modules/jest-worker/build/index.js 38:41-64

 @ ./node_modules/terser-webpack-plugin/dist/index.js 22:18-40

 @ ./node_modules/terser-webpack-plugin/dist/cjs.js 3:15-33

 @ ./node_modules/webpack/lib/config/defaults.js 952:25-57

 @ ./node_modules/webpack/lib/index.js 328:10-66

 @ ./src/index.js 14:0-35

 

WARNING in ./node_modules/jest-worker/build/workers/processChild.js 113:15-28  

Critical dependency: the request of a dependency is an expression

 @ ./node_modules/jest-worker/build/workers/ChildProcessWorker.js 142:6-39     

 @ ./node_modules/jest-worker/build/WorkerPool.js 41:15-62

 @ ./node_modules/jest-worker/build/index.js 38:41-64

 @ ./node_modules/terser-webpack-plugin/dist/index.js 22:18-40

 @ ./node_modules/terser-webpack-plugin/dist/cjs.js 3:15-33

 @ ./node_modules/webpack/lib/config/defaults.js 952:25-57

 @ ./node_modules/webpack/lib/index.js 328:10-66

 @ ./src/index.js 14:0-35

 

WARNING in ./node_modules/loader-runner/lib/loadLoader.js 19:16-36

Critical dependency: the request of a dependency is an expression

 @ ./node_modules/loader-runner/lib/LoaderRunner.js 7:17-40

 @ ./node_modules/webpack/lib/NormalModule.js 9:35-59

 @ ./node_modules/webpack/lib/index.js 248:9-34

 @ ./src/index.js 14:0-35

 

WARNING in ./node_modules/terser-webpack-plugin/dist/minify.js 279:118-125     

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

 @ ./node_modules/terser-webpack-plugin/dist/index.js 26:14-33 288:31-58       

 @ ./node_modules/terser-webpack-plugin/dist/cjs.js 3:15-33

 @ ./node_modules/webpack/lib/config/defaults.js 952:25-57

 @ ./node_modules/webpack/lib/index.js 328:10-66

 @ ./src/index.js 14:0-35

 

WARNING in ./node_modules/webpack/lib/serialization/ObjectMiddleware.js 636:9-25

Critical dependency: the request of a dependency is an expression

 @ ./node_modules/webpack/lib/util/serialization.js 19:1-45

 @ ./node_modules/webpack/lib/index.js 539:10-41

 @ ./src/index.js 14:0-35

 

11 warnings have detailed information that is not shown.

Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.       

 

webpack 5.38.1 compiled with 11 warnings in 91249 ms

رابط هذا التعليق
شارك على الشبكات الإجتماعية

انضم إلى النقاش

يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.

زائر
أجب على هذا السؤال...

×   لقد أضفت محتوى بخط أو تنسيق مختلف.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   جرى استعادة المحتوى السابق..   امسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

  • إعلانات

  • تابعنا على



×
×
  • أضف...