taro小程序指定@代表

1.ts.config.json

"paths": {
  "@/*": ["./src/*"]
}

taro小程序指定@代表_第1张图片

config/index.js

const path = require('path')
alias: {
  '@': path.resolve(__dirname, '..', 'src')
},

taro小程序指定@代表_第2张图片

你可能感兴趣的:(taro,小程序)