Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

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

Open
pemson91 opened this issue Dec 29, 2021 · 1 comment

Comments

@pemson91
Copy link

pemson91 commented Dec 29, 2021

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)

Context

Your Environment

  • Version used: 4.x
  • Browser Name and version: Firefox
  • Operating System and version (desktop or mobile): Mac OS
  • Link to your project:
@bohemier
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants