Vue does not compile js files in node_modules

use the following library

https://github.com/Justineo/v.

in main.js

import "vue-awesome/icons"

the error is as follows:

Uncaught SyntaxError: Unexpected string

check that it should not be compiled

clipboard.png

but I added compilation to my webpack.base.conf as follows:

  {
    test: /\.js$/,
    loader: "babel-loader",
    include: [
      path.join(projectRoot, "src"),
      path.join(projectRoot, "node_modules/vue-awesome"),       
    ],
    exclude: /node_modules/,
  },
  

may I ask why the front-end god is this? What are we going to do?!


the official website says webpack.base.conf.js should do this:

 

exclude: / node_modules/

try to remove this line of code

Menu