deeprobe
V2EX  ›  问与答

react 如何 build 成一个 html 文件

  •  
  •   deeprobe · Feb 27, 2021 · 2581 views
    This topic created in 2096 days ago, the information mentioned may be changed or developed.

    build 后 static 里有 js 和 css 等文件,有没有打包命令可以把 static 打包进一个 html 文件里去?

    throns
    throns
    Feb 27, 2021 via iPhone
    1
    可以写个 gulp 脚本替换,看看这个文章 https://www.labnol.org/code/bundle-react-app-single-file-200514
    EridanusSora
    EridanusSora
    Feb 27, 2021 via Android
    2
    html-webpack-plugin
    deeprobe
    deeprobe
    OP
    Mar 3, 2021
    3
    @throns 多谢多谢,很好用。就是打成的文件体积挺大。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2056 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 15:20 · PVG 23:20 · LAX 07:20 · JFK 10:20
    ♥ Do have faith in what you're doing.