undefinedfix
Sign in

SyntaxError: Unexpected string

thienhabetsi edited in Sun, 30 Oct 2022

next.js Introducing antd to report an error:

2 Replies
qgazn
commented on Sun, 30 Oct 2022

The problem has been solved because I have a library directory in hiynn design, because my library also uses Babel import plugin, and the library in the library also uses BiP. Therefore, if I want to keep the same library directory, I will simply comment it. . babelrc.js :

[
    "import",
    {
      libraryName: "antd",
      // libraryDirectory: "es",
      style: true // `style: true` 会加载 less 文件
    },
    "antd"
  ],
SpenserWilson1
commented on Sun, 30 Oct 2022

Use require (' xx.less ) try