突然的更新代码整崩了啊!
wangzishengwzs opened this issue · 3 comments
wangzishengwzs commented
原来pinyin.match(),现在pinyin.default.match()
xmflswood commented
@lovebigbird 你是怎么引入的
环境是什么
wangzishengwzs commented
react项目,npm引入1.1.7版本.现在需要这样使用const pinyin = require('pinyin-match');pinyin.default.match()
xmflswood commented
@lovebigbird
采用import
如果非要使用require 可以使用
或者 const pinyin = require('pinyin-match/lib/man.js') 或者 const pinyin = require('pinyin-match').default
webpack/webpack#4742 (comment)
"always prefer import nowadays. Only use require if the package is not an ES Module."