Create react app introduces a single picture to report an error.

Why can logo but not a.png?

import React, { Component } from "react";
import "./App.css";
import logo from "./logo.svg"
import imgs from "./a.png"

let imgJson = require("./imageDatas");

function imgURL(imgDateArray) {

    for(var i=0;i<imgDateArray.length;iPP){
        var signleImageData = imgDateArray[i];
        signleImageData.imageURL =`./react-card/src/img/${signleImageData.fileName}`;
       // console.log(signleImageData.imageURL)
        return signleImageData.imageURL
        //imgDateArray[i] = signleImageData;
    }
}

var url = imgURL(imgJson);
console.log(url);

class App extends Component {

  render() {
    return (
      <div className="App">
        <header className="App-header">
          <img src={logo} className="App-logo" alt="logo" />
            <img src={imgs} />
          <h1 className="">Welcome to React  </h1>
        </header>
        <p className="App-intro">
          To get started, edit src/App.js and save to reload.
        

</div> ); } } export default App;

clipboard.png

Apr.01,2021

whether the file exists or not can png be added to, webpack module


https://codeshelper.com/q/10.


should not be configured with the appropriate webpack-loader, one is svg, and the other is png. Loader is different

but logically, we can handle both svg and png using url-loader.

        {
          test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
          exclude: /node_modules/,
          include: [opts.src],
          use: [
            {
              loader: 'url-loader',
              options: {
                limit: opts.urlLimit,
                name: url_name
              }
            }
          ]
        }

so at least post your configuration?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b7c9-4ef00.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b7c9-4ef00.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?