如何使webpack不解析css文件中的路径?

如何使webpack不解析css文件中的路径?,webpack,Webpack,webpack.config.js 在构建项目时,webpack尝试从css加载文件 背景:url(owl.video.play.png)不重复 我应该在配置中指定什么,这样它就不会试图替换它们,而是让它们保持原样 var ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = { entry: './public/js/main.js', output: { filename:

webpack.config.js

在构建项目时,webpack尝试从css加载文件

背景:url(owl.video.play.png)不重复

我应该在配置中指定什么,这样它就不会试图替换它们,而是让它们保持原样

var ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = {
  entry: './public/js/main.js',
  output: {
    filename: './public/build/bundle.js'
  },
  resolve: {
    modulesDirectories: ['node_modules']
  },
  module: {
    loaders: [
      {
        test: /\.js/,
        loader: 'babel',
        exclude: /(node_modules|bower_components)/
      },
      {
        test: /\.css$/,
        loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
      }
    ]
  },
  plugins: [
    new ExtractTextPlugin('./public/build/bundle.css')
  ]
};