You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I used patch-package to patch webpack-browser-extension-polyfill@1.1.1 for the project I'm working on.
So we have two broblems. The first broblem is the wrong paths resolving. We don't needed path.relative() in this case, because resolvePolyfillPathRelativeToFile() already get for us a relative path. So path.resolve() think that browser-polyfill is in a dir we are running from. As a result - wrong path in popup.html
The second problem - html DOM, When we are execuring readFile, html doc is parsing like a DOM, so when we are trying to save the changed DOM, fs throwing an error. So let's use outerHTML property to solve this problem.
Hi! 馃憢
Firstly, thanks for your work on this project! 馃檪
Today I used patch-package to patch
webpack-browser-extension-polyfill@1.1.1
for the project I'm working on.So we have two broblems. The first broblem is the wrong paths resolving. We don't needed path.relative() in this case, because resolvePolyfillPathRelativeToFile() already get for us a relative path. So path.resolve() think that browser-polyfill is in a dir we are running from. As a result - wrong path in popup.html
The second problem - html DOM, When we are execuring readFile, html doc is parsing like a DOM, so when we are trying to save the changed DOM, fs throwing an error. So let's use outerHTML property to solve this problem.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: