Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

执行yarn run lib编译报错了 #2

Open
TerryChenUI opened this issue Dec 5, 2019 · 3 comments
Open

执行yarn run lib编译报错了 #2

TerryChenUI opened this issue Dec 5, 2019 · 3 comments

Comments

@TerryChenUI
Copy link

TerryChenUI commented Dec 5, 2019

$ 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
Copy link
Author

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

@anncwb
Copy link
Owner

anncwb commented Dec 5, 2019

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

@anncwb
Copy link
Owner

anncwb commented Dec 5, 2019

我在排查下

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants