gregnb / filemanager-webpack-plugin

Copy, move, archive (zip/tar/tar.gz), delete files and directories before and after Webpack builds. Win32/Mac/*Nix supported
MIT License
463 stars 34 forks source link

Action to replace file content #121

Open andersonaguiaralves opened 1 year ago

andersonaguiaralves commented 1 year ago

Fix issue https://github.com/gregnb/filemanager-webpack-plugin/issues/65

Hey fellows, my test it's not 100%, can you guys help me with this?

Line 18 it's reading the file before the changes are made and it returns "lorem-ipsum", I need this to return "loren.ipsun" (because of my mutations in line 37), and then I'll be able to change line 22 to return data == pattern to a perfect test.

Thank you.

sibiraj-s commented 1 year ago

Any thoughts regarding the issue mentioned here https://github.com/gregnb/filemanager-webpack-plugin/issues/65#issuecomment-739892100?

andersonaguiaralves commented 1 year ago

Any thoughts regarding the issue mentioned here #65 (comment)?

I really don't know .

Let me explain to you how I use replaceInFile:

Microfrontend is knocking on my door. I'm running a Magento 2 application, and after using filemanager-webpack-plugin to move a React Application files to a Magento 2 module, now I'm able to replace some files with some important terms (because Magento 2 uses PHP) to make it run.

That's very powerful because now I'm able to run react components in a Magento Application.

Well, that's the way this implementation was useful to me. I guess other developers can use their imagination to use Replace In File as they can or even make ReplaceInFile more and more complete, with other good options.

Thank you.