You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
问题
在
fighting-design
执行pnpm build
之后,会进行组件打包,那么在start
目录引入打包的dist
目录的时候,默认引入的是lib/index
因为组件库内部分别打包了
es
和cjs
模块,按照我的理解在 vue 中应该是会指向es/index
,更何况在package.json
中已经配置了:那么为什么默认的引入路径加载的是
lib/index
呢?测试
在
start
目录下,我新增了 test 目录,下面有三个文件:然后在
main.ts
中引入测试发现控制器打印的日志为
我是 ES6 模块
,说明package.json
的配置是生效的,但是为什么我的打包之后就不生效呢?Beta Was this translation helpful? Give feedback.
All reactions