Skip to content
索引

开发

记录开发遇到的问题

Critical dependency: the request of a dependency is an expression

vite中require了一个表达式 , 改为字符串即可

js
require(`${path}`)
require(`${path}`)

** is defined but never used eslint

eslint校验未使用变量,settings.json中关闭校验

json
"eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "babel-eslint"
    },
    "rules": {
      "no-unused-vars": "off",
      "vue/valid-template-root": "warn"
    }
  }
"eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "babel-eslint"
    },
    "rules": {
      "no-unused-vars": "off",
      "vue/valid-template-root": "warn"
    }
  }

for division is deprecated and will be removed in Dart Sass 2.0.0

sass版本出现问题,切换回合适的版本

bash
npm i -s sass@1.32.6
npm i -s sass@1.32.6

Released under the MIT License.