Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Webpack 带有网页包的vue样式的损坏图像_Webpack_Vuejs2_Urlloader - Fatal编程技术网

Webpack 带有网页包的vue样式的损坏图像

Webpack 带有网页包的vue样式的损坏图像,webpack,vuejs2,urlloader,Webpack,Vuejs2,Urlloader,这就是风格 <style scoped> section.hero { background-image: url('../../img/mountain.jpg'); height: 400px; } </style> 控制台似乎很好。。没有记录任何错误。 但是,图像未加载。这是一幅破碎的图像。 请帮忙 test: /\.vue$/, loader: 'vue-loader', options:

这就是风格

<style scoped>
    section.hero {
        background-image: url('../../img/mountain.jpg');
        height: 400px;
    }
</style>
控制台似乎很好。。没有记录任何错误。 但是,图像未加载。这是一幅破碎的图像。
请帮忙

    test: /\.vue$/,
    loader: 'vue-loader',
    options: {
      loaders: {
        // Since sass-loader (weirdly) has SCSS as its default parse mode, we map
        // the "scss" and "sass" values for the lang attribute to the right configs here.
        // other preprocessors should work out of the box, no loader config like this necessary.
        'scss': 'vue-style-loader!css-loader!sass-loader',
        'sass': 'vue-style-loader!css-loader!sass-loader?indentedSyntax'
      }
      // other vue-loader options go here
    }
  },
  {
    test: /\.js$/,
    loader: 'babel-loader',
    exclude: /node_modules/
  },
  {
    test: /\.(png|jpg|gif|svg)$/,
    loader: 'file-loader',
    options: {
      name: '[name].[ext]?[hash]'
    }
  },
  {
    test: /\.css$/,
    use: [ 'style-loader', 'css-loader' ]
  },
  {
    test: /\.(png|jpg|gif)$/,
    use: [
      {
        loader: 'url-loader',
        options: {
          limit: 8192
        }
      }
    ]
  }