Weex wants to turn the picture into base64 and merge it into js to report an error.

weex-v
v1.3.11

add

to webpack
{
    test: /\.(jpg|jpeg|gif|png)$/,
    use: [{
      loader: "url-loader",
      options: {
        limit: 10000,
        name: "img/[name].[sha512:hash:base64:7].[ext]"
      },
    }],
    exclude: config.excludeModuleReg
},
The

web environment can see that it becomes base64, and can use

run npm run andriod or npm run ios

error

WARNING in ./src/images/index/icon-close.png     Module parse failed: Unexpected character "" (1:0)     You may need an appropriate loader to handle this file type.

self-npm install url-loader file-loader is useless

Feb.08,2022

in webpack.common.conf.js

// Config for compile jsbundle for native.
const weexConfig = {
...

{
        test: /\.(png|jp(e*)g|svg)$/,  
        use: [{
            loader: 'url-loader',
            options: { 
                limit: 10000, // Convert images < 10kb to base64 strings
                name: 'images/[name].[ext]'
            }
        }]
      }

it used to be because it was written in webConfig.

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-1b35f4e-2b33b.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-1b35f4e-2b33b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?