账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    html-withimg-loader与html-loader冲突
    47
    0

    1.使用了html-loader来加载代码片段
    2.用html-withimg-loader 来打包html 里的Img
    但是这两个loader 要冲突
    正确加载片段 图片地址就不能正确打包
    正确打包图片,html片段就不能加载

     <%= require('html-loader!./layout/html-head.html') %>
    
    
    
    module: {
            loaders: [
                {
                    test: /\.css$/,
                    use: ExtractTextPlugin.extract({
                        fallback: "style-loader",
                        use: "css-loader"
                    })
                },
                {
                    test: /\.(gif|png|jpg|woff|svg|eot|ttf)\??.*$/,
                    use: 'url-loader?limit=100&name=resource/[name].[ext]'
                },
                {
                    test: /\.(htm|html)$/i,
                    use: ['html-withimg-loader']
                }
            ]
        },
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部