Webpack 从鲍尔迁移+;吞咽到网页包-将依赖项注入到html
我是从bower+gulp迁移过来的。我曾经使用过gulp注入插件: 使用这种注入单个依赖项的方式:Webpack 从鲍尔迁移+;吞咽到网页包-将依赖项注入到html,webpack,gulp,bower,Webpack,Gulp,Bower,我是从bower+gulp迁移过来的。我曾经使用过gulp注入插件: 使用这种注入单个依赖项的方式: <!DOCTYPE html> <html> <head> <title>My index</title> <!-- bower:css --> <!-- bower installed css files will go here... --> <!-- endinject -->
<!DOCTYPE html>
<html>
<head>
<title>My index</title>
<!-- bower:css -->
<!-- bower installed css files will go here... -->
<!-- endinject -->
<!-- inject:css -->
<!-- built css files will go here... -->
<!-- endinject -->
</head>
<body>
<!-- bower:js -->
<!-- bower installed scripts will go here... -->
<!-- endinject -->
<!-- inject:js -->
<!-- app scripts will go here... -->
<!-- endinject -->
</body>
</html>
我的索引
对于产品,我会将所有依赖项缩小为一个js,并使用当前时间戳的散列来覆盖浏览器所做的任何缓存
现在,我正试图转到webpack(作为移除bower的一部分,并改用npm)
我想知道两件事,都是在html依赖注入方面: