Subwaytime / vite-aliases

Alias auto generation for Vite
https://www.npmjs.com/package/vite-aliases
MIT License
213 stars 13 forks source link

yarn 3.5 pnpm [vite-aliases] - TypeScript is not installed, fallback to JS only. #60

Closed thisVioletHydra closed 1 year ago

thisVioletHydra commented 1 year ago

Folders

image

vite config

   ViteAliases({
      dir: 'src',
      prefix: '~~',
      deep: true,
      depth: 1,
      createLog: true,
      logPath: './logs/',
      createGlobalAlias: true,
      adjustDuplicates: false,
      useAbsolute: false,
      useIndexes: false,
      useConfig: true,
      dts: false,

      root: process.cwd(),
    }),

console

❯ yarn -v
3.5.0
❯ node -v
v20.0.0

package.json

{
  "version": "1.1.233",
  "scripts": {
    "log": "auto-changelog -p && git add CHANGELOG.md",
    "build": "vite build",
    "build:watch": "tsc && vite build --watch",
    "build:old": "tsc && vite build",
    "dev": "vite",
    "go": "del-cli dist -f && vite",
    "go1": "tsc && vite",
    "go:dev": "vite --mode development",
    "go:prod": "vite --mode production",
    "serve": "vite preview",
    "up": "yarn upgrade-interactive --latest",
    "line::push": " ____________ 🚀 PUSH 🚀 ____________ ",
    "push": "yarn npm-run-all run:push::*",
    "run:push::patch": "yarn version --patch",
    "run:push::status": "git status -s",
    "run:push::add": "git add . ",
    "run:push::autopush": "yarn autopush",
    "run:push::push": "git push --follow-tags",
    "line::autopush": " ____________ 🚀 AUTOPUSH 🚀 ____________ ",
    "autopush": "pwsh -Command . ${env:userprofile}/.vscode/extensions/roman.git-autocommit-1.2.3/index.ps1",
    "line::fetch": " ____________ 🚀 GIT 🚀 ____________ ",
    "fetch": "yarn npm-run-all run:git::*",
    "run:git::fetch": "git fetch",
    "run:git::merge": "git merge",
    "run:git::yarn": "yarn",
    "killnode": "taskkill /f /im node.exe /im RuntimeBroker.exe"
  },
  "engines": {
    "node": ">=18"
  },
  "types": [
    "**/*.d.ts",
    "types.d.ts",
    "index.d.ts"
  ],
  "os": [
    "darwin",
    "win32",
    "linux"
  ],
  "type": "module",
  "name": "sudir-external",
  "packageManager": "yarn@3.5.0",
  "dependencies": {
    "@rushstack/eslint-patch": "^1.2.0",
    "@typescript-eslint/eslint-plugin": "^5.59.0",
    "@typescript-eslint/parser": "^5.59.0",
    "@vitejs/plugin-basic-ssl": "^1.0.1",
    "@vue/eslint-config-prettier": "^7.1.0",
    "@vue/eslint-config-typescript": "^11.0.2",
    "amdefine": "^1.0.1",
    "auto-changelog": "^2.4.0",
    "autoprefixer": "^10.4.14",
    "axios": "^1.3.6",
    "cssnano": "^6.0.0",
    "del-cli": "^5.0.0",
    "esbuild": "^0.17.18",
    "eslint": "^8.39.0",
    "eslint-config-airbnb-base": "^15.0.0",
    "eslint-config-airbnb-typescript": "^17.0.0",
    "eslint-config-prettier": "^8.8.0",
    "eslint-import-resolver-alias": "^1.1.2",
    "eslint-import-resolver-custom-alias": "^1.3.0",
    "eslint-import-resolver-typescript": "^3.5.5",
    "eslint-plugin-import": "^2.27.5",
    "eslint-plugin-json": "^3.1.0",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-optimize-regex": "^1.2.1",
    "eslint-plugin-package-json": "^0.1.4",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-promise": "^6.1.1",
    "eslint-plugin-sonarjs": "^0.19.0",
    "eslint-plugin-unicorn": "^46.0.0",
    "eslint-plugin-vue": "^9.11.0",
    "jsonlint": "^1.6.3",
    "jsonlint-mod": "^1.7.6",
    "node-html-parser": "^6.1.5",
    "npm-run-all": "^4.1.5",
    "postcss": "^8.4.23",
    "postcss-at-rules-variables": "^0.3.0",
    "postcss-calc": "^8.2.4",
    "postcss-combine-duplicated-selectors": "^10.0.3",
    "postcss-custom-properties": "^13.1.5",
    "postcss-discard-comments": "^6.0.0",
    "postcss-each": "^1.1.0",
    "postcss-for": "^2.1.1",
    "postcss-hexrgba": "^2.1.0",
    "postcss-html": "^1.5.0",
    "postcss-import": "^15.1.0",
    "postcss-lit": "^1.1.0",
    "postcss-merge-rules": "^6.0.0",
    "postcss-mixins": "^9.0.4",
    "postcss-nested": "^6.0.1",
    "postcss-pxtorem": "^6.0.0",
    "postcss-rename": "^0.6.1",
    "postcss-reporter": "^7.0.5",
    "postcss-responsive-type": "^1.0.0",
    "postcss-simple-vars": "^7.0.1",
    "postcss-sorting": "^8.0.2",
    "postcss-url": "^10.1.3",
    "prettier": "^2.8.8",
    "sanitize.css": "^13.0.0",
    "stylelint": "^15.6.0",
    "stylelint-config-html": "^1.1.0",
    "stylelint-config-recommended-vue": "^1.4.0",
    "stylelint-config-standard": "^33.0.0",
    "stylelint-prettier": "^3.0.0",
    "ts-node": "^10.9.1",
    "typescript": "^5.0.4",
    "unplugin-auto-import": "^0.15.3",
    "unplugin-fonts": "^1.0.3",
    "unplugin-vue-components": "^0.24.1",
    "vite": "^4.3.1",
    "vite-aliases": "^0.11.0",
    "vite-plugin-checker": "^0.5.6",
    "vite-plugin-chunk-split": "^0.4.7",
    "vite-plugin-imp": "^2.3.1",
    "vite-plugin-inspect": "^0.7.24",
    "vite-plugin-mkcert": "^1.14.0",
    "vite-plugin-replace-json": "^1.0.1",
    "vite-svg-loader": "^4.0.0",
    "vue-eslint-parser": "^9.1.1"
  },
  "devDependencies": {
    "@types/eslint": "^8",
    "@types/node": "^18.16.0",
    "@types/postcss-reporter": "^7",
    "@types/postcss-url": "^10",
    "@types/prettier": "^2",
    "@types/requirejs": "^2"
  },

}
Subwaytime commented 1 year ago

Not sure if i understand the issue here correctly.

1) In your dependencies you got "typescript": "^5.0.4" installed, aka. the project is gonna detect typescript. 2) on the other hand you are setting dts to false..

What are you trying to achieve? Using typescript or not?

Subwaytime commented 1 year ago

@thisVioletHydra

Subwaytime commented 1 year ago

stale issue

thisVioletHydra commented 1 year ago

Not sure if i understand the issue here correctly.

  1. In your dependencies you got "typescript": "^5.0.4" installed, aka. the project is gonna detect typescript.
  2. on the other hand you are setting dts to false..

What are you trying to achieve? Using typescript or not?

ur code try read folder node_modules, but pnpm no have this folder i think need another path to check this problem

@Subwaytime