search

Home  >  Q&A  >  body text

javascript - How does webpack replace all html in src into build?

For example, there are a.html, b.html, c.html... in src. After I modify the html file in src, how do I replace it in the build folder? Build is online and src is development

世界只因有你世界只因有你2745 days ago740

reply all(3)I'll reply

  • ringa_lee

    ringa_lee2017-06-12 09:30:43

    What you mean is not very clear
    If you just want to put the html files in the build folder, you can install copy-webpack-plugin to copy these files. Of course, you can also use nodejs to run shell copy. At this time Using shelljs is a good solution.

    If you want to have multiple entries, you need to configure it in html-webpack-plugin. For specific configuration methods, please refer to the linked document

    reply
    0
  • 欧阳克

    欧阳克2017-06-12 09:30:43

    What you described is not very understandable

    If you just want to replace files, then just write a script

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-06-12 09:30:43

    Wouldn’t it be enough to just write a script in python or node?.

    reply
    0
  • Cancelreply