lib-starter icon indicating copy to clipboard operation
lib-starter copied to clipboard

执行yarn run lib编译报错了

Open TerryChenUI opened this issue 5 years ago • 3 comments
trafficstars

$ cross-env NODE_ENV=production rimraf ./lib && node ./build/rollup.build 正在打包第1/9个文件... 'D:Githublib-starter-master untimeplugin-vue ormalize.js' is imported by packages\test-module\src\main.vue, but could not be resolved – treating it as an external dependency 'D:Githublib-starter-master untimeplugin-vue ormalize.js' is imported by packages\file-handle\src\main.vue, but could not be resolved – treating it as an external dependency (node:177700) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined at getData (D:\Github\lib-starter-master\node_modules\rollup-plugin-filesize\dist\index.js:72:68) at D:\Github\lib-starter-master\node_modules\rollup-plugin-filesize\dist\index.js:91:21 at Array.forEach () at Object.generateBundle (D:\Github\lib-starter-master\node_modules\rollup-plugin-filesize\dist\index.js:90:10) at Promise.resolve.then (D:\Github\lib-starter-master\node_modules\rollup\dist\rollup.js:12850:25)

TerryChenUI avatar Dec 05 '19 02:12 TerryChenUI

rollup-plugin-vue版本兼容有问题,删掉node_modules重装后可重现

TerryChenUI avatar Dec 05 '19 03:12 TerryChenUI

yarn run lib 比较适合库的打包, 打包vue的话最好使用yarn run lib:cli

anncwb avatar Dec 05 '19 09:12 anncwb

我在排查下

anncwb avatar Dec 05 '19 09:12 anncwb