emulsify-ds / documentation

Documentation for the Emulsify Design System
https://docs.emulsify.info
7 stars 7 forks source link

How to add a third party library like jquery for emulsify v4.x in drupal 9 #38

Open pemson91 opened 2 years ago

pemson91 commented 2 years ago

Expected Behavior

Missing steps to add Third party library in emulsify-ds v 4.x for drupal 9. I want to add jquery library for my theme as most of my components depend on it.

Current Behavior

The current steps provided in the document are related to the 2.x version and need to be updated.

Possible Solution

In webpack.config.js we may need to add overrideConfig.globals and add jQuery which seems tricky for now.


 new ESLintPlugin({
      context: path.resolve(__dirname, '../', 'components'),
      extensions: ['js'],
      overrideConfig: { globals: jQuery },
    }),

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

bohemier commented 2 years ago

Hello @pemson91

What works for me is to follow the steps described in the docs https://docs.emulsify.info/emulsify-drupal/emulsify-drupal/advanced-usage/3rd-party-libraries#jquery but skip the "Add jQuery as a Global in Webpack" step.

I think this part should be removed from the documentation?