taro升级到2.0.3,提示错误。



  • 升级到taro2之后,编译没有问题。

    但是import进来的工具库,出现问题了,应该是webpack打包的问题,大家帮忙看看:

    import Taro from '@tarojs/taro'
    import buildUrl from 'build-url'
    import { _ } from 'lodash'
    
    
    vendors.js:6446 Uncaught TypeError: Cannot read property 'buildUrl' of undefined
        at vendors.js:6446
        at Object../node_modules/build-url/dist/build-url.js (vendors.js:6526)
        at __webpack_require__ (runtime.js? [sm]:80)
        at Object../src/utilities/fetch-data/index.js (vendors.js:18931)
        at __webpack_require__ (runtime.js? [sm]:80)
        at Object.srcPagesProductShowJsx (show.js? [sm]:28)
        at __webpack_require__ (runtime.js? [sm]:80)
        at checkDeferredModules (runtime.js? [sm]:46)
        at Array.webpackJsonpCallback [as push] (runtime.js? [sm]:33)
        at show.js? [sm]:1
    

登录后回复