caihg
caihg
请教有关webpack的两个问题: 1. 对于在模板中用 img src="*" 引入的图片,怎么加md5戳并替换新的路径; 2. 怎么将不同页面的图片加md5戳后输出到对应的目录下 例如:page1.html用到的图片输出到page1目录下,page2.html用到的图片输出到page2目录下 webpack.config.js 相关配置如下: module: { loaders: [ { test: /.(jpe?g|png|gif)$/, loader: 'url?limit=8192&name=images/[name]-[hash:8].[ext]' } ] }, plugins: [ new HtmlWebpackPlugin({ template: 'page1/page1.html', filename:...
@sfsoul 不能过滤这种伪造的元素对象 Object.create(HTMLElement.prototype, { nodeType: { value: 1 } });
试试 distinct [https://www.onlyling.com/archives/245](url)
@atheist1 非递归版的 deepTraversal3 实际上是广度优先的