Webpack third party js compilation can not go through, ask what loader is missing

problem description

clipboard.png

clipboard.png

clipboard.png
cDS)

rules: [...(config.dev.useEslint ? [createLintingRule()] : []), {
        test: /\.vue$/,
        loader: "vue-loader",
        options: vueLoaderConfig
      }, {
        test: /\.js$/,
        loader: "babel-loader",
        include: [resolve("src"), resolve("test"), resolve("node_modules/webpack-dev-server/client")]
      }, {
        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
        loader: "url-loader",
        options: {
          limit: 10000,
          name: utils.assetsPath("img/[name].[hash:7].[ext]")
        }
      }, {
        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
        loader: "url-loader",
        options: {
          limit: 10000,
          name: utils.assetsPath("media/[name].[hash:7].[ext]")
        }
      }, {
        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
        loader: "url-loader",
        options: {
          limit: 10000,
          name: utils.assetsPath("fonts/[name].[hash:7].[ext]")
        }
      }
      /*,
            {
              test: /\.less/,
              use: ExtractTextPlugin.extract({
                use: ["css-loader?minimize", "autoprefixer-loader", "less-loader"],
                fallback: "style-loader"
              })
            }*/
    ]
Apr.08,2021

requires a babel plug-in https://github.com/vuejs/babe.


you use the syntax of jsx, take a look at what plug-ins are needed to use jsx in vue


this is obviously the way jsx is written. You still need jsx-loader


you may not have introduced the components written by react in vue. You are really talented

.
Menu