小程序开发者工具版本:
基础库版本: "libVersion": "2.15.0",
使用npm install --save ts-jackson 安装JSON 序列化工具库,
本地调试时报错:module ‘dataprovider/ts-jackson.js' not found
使用 TypeScript做开发,编译成js后对应的require语句为:requrie('ts-jackson')
请问怎么在微信小程序中使用node_modules中的第三方库?
工程目录结构
E:.
+---.vscode
+---miniprogram
| +---dataprovider
| +---entities
| +---font
| +---img
| +---pages
| | +---home_page
| | \---login_page
| +---services
| \---utils
+---node_modules
| +---.bin
| +---lodash.get
| +---lodash.set
| +---miniprogram-api-typings
| | \---types
| | \---wx
| +---reflect-metadata
| | \---docs
| +---ts-jackson
| | \---dist
| | \---src
| | \---common
| | +---asserts
| | \---errors
| \---typescript
| +---bin
| +---lib
| | +---cs
| | +---de
参考https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html