Webpack, why can't the path be displayed to the picture when the picture is packaged successfully?


css


webpackconfig

  module: {
        // preLoaders: [
        //     //  
        //     {test: /\.(js|jsx)$/, loader: "eslint-loader", exclude: /node_modules/}
        // ],
        loaders: [
            { test: /\.(js|jsx)$/, exclude: /node_modules/, loader: "babel" },
            { test: /\.less$/, exclude: /node_modules/, loader: "style!css!postcss!less" },
            { test: /\.css$/, exclude: /node_modules/, loader: "style!css!postcss" },
            { test:/\.(png|gif|jpg|jpeg|bmp)$/i, loader:"url-loader?limit=5000" },  // 5kb
            { test:/\.(png|woff|woff2|svg|ttf|eot)($|\?)/i, loader:"url-loader?limit=5000"} // 5k
        ]
    },

  1. can I open it in a browser by clicking on the picture link?
  2. can be opened to see if the background image is covered;
  3. if not, it means that no static resources have been loaded successfully. Check webpack
Menu