I am new to magento and i have researched this issue i am having for enough time to post it here.

My goal is to understand how require-js works with node modules.


$themeDir = app/design/frontend/<whatever>/<theme_name>

I have `$themeDir/node_modules` installed via npm
I have `$themeDir/require-config.js`
  1. I want to include in all pages node_modules/bootstrap/js/dist/aaa.js
  2. I also want to define node_modules/generic/four/path/bbb.js in $themeDir/Whatever_Module/require-config.js so i can call it within .phtml templates found in Whatever_Module

How would i go about doing such a thing ? I don't have any specifics but this is a info case that i need to properly understand.

  • 1
    It is wonderful how a 2.5k + stack points or whatever with 60+ badges corrects my freaking grammar instead of actually providing an answer. great community After a 2 hour wait this thread will die in the depths of the internet, but at least Teja bhagavan Kollepara gave me a grammar lesson. FFS – user1840302 Sep 19 '18 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.