V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
where2go
V2EX  ›  问与答

请教对 已有的传统方式开发能直接正常显示的页面 进行 webpack 打包的问题

  •  
  •   where2go · 2018-10-04 21:47:08 +08:00 · 997 次点击
    这是一个创建于 2020 天前的主题,其中的信息可能已经有所发展或是发生改变。

    比如原来的页面下面这样的, 一个 html 包含一个 css 和两个 js, 能直接在浏览器里正常工作。 怎么把这些文件打包成一个 html 文件呢, 而且把 js css html 里面的换行都去掉。

    <!DOCTYPE html>
    <html>
    <head>
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="style.css">
    <script src="file1.js"></script>
    <script src="file2.js"></script>
    </head>
    <body>
    <center>
    </center>
    </body>
    </html>
    

    npm 安装东西都能搞定了 html-webpack-inline-source-plugin html-webpack-plugin 也都安装了 求对应的 webpack 配置文件, 谢谢了

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5069 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:47 · PVG 17:47 · LAX 02:47 · JFK 05:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.