# Override a 3rd party plugin's js file with my frontend js file

**URL:** <https://forum.shopware.com/t/override-a-3rd-party-plugins-js-file-with-my-frontend-js-file/94938>\
**Category:** Programming (EN)\
**Created:** [23. Juni 2022 um 05:10 UTC](https://forum.shopware.com/t/override-a-3rd-party-plugins-js-file-with-my-frontend-js-file/94938 "2022-06-23T05:10:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [23. Juni 2022 um 05:10 UTC](https://forum.shopware.com/t/override-a-3rd-party-plugins-js-file-with-my-frontend-js-file/94938/1 "2022-06-23T05:10:27Z")

</div>

```
    Hi
    
    I want to override a 3rd party plugin's js file with my frontend js file
    
    the 3rd party plugins path is the following
    
    `custom/plugins/ThirdPartyPlugin/src/Resources/app/storefront/src/third-party-plugin/third-party-plugin.plugin.js`
    
    I have created a new plugin MyPlugin and tried to import the js file 

```

```auto
import ThirdPartyPlugin from '../../../../../../../../ThirdPartyPlugin/src/Resources/app/storefront/src/third-party-plugin/third-party-plugin.plugin';
        
        export default class MyPlugin extends ThirdPartyPlugin 
        {
        
           -------------------
        }

```

```
    It is working now, but the problem is while deploying via the GitHub pipeline I am getting the following error

```

```auto
       ERROR in /plugins/MyPlugin/src/Resources/app/storefront/src/third-party-plugin/third-party-plugin.plugin.js
Module not found: Error: Can't resolve '../../../../../../../../ThirdPartyPlugin/src/Resources/app/storefront/src/third-party-plugin/third-party-plugin.plugin' in '/plugins/MyPlugin/src/Resources/app/storefront/src/third-party-plugin'

```

How we can replace this relative path?

---

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [23. Juni 2022 um 05:39 UTC](https://forum.shopware.com/t/override-a-3rd-party-plugins-js-file-with-my-frontend-js-file/94938/2 "2022-06-23T05:39:47Z")

</div>

Replace the path with an absolute path like the following

`import ThirdPartyPlugin from '/app/custom/plugins/ThirdPartyPlugin/src/Resources/app/storefront/src/third-party-plugin/third-party-plugin.plugin';`
