onebay / vite-plugin-imp

A vite plugin for import library component style automatic.
MIT License
231 stars 24 forks source link

构建出错 #26

Closed agileago closed 2 years ago

agileago commented 2 years ago

Describe the bug 使用vant的时候,vite build构建报错

[vite]: Rollup failed to resolve import "vant/es/lazyload" from "src/main.ts".

Libarary Info(please complete the following information): Libarary: vant

To Reproduce

viteImp({
      libList: [
        {
          libName: 'vant',
          // replaceOldImport: false,
          style: name => `vant/es/${name}/style/index.js`,
        },
      ],
    }),

Expected behavior build right , when i set replaceOldImport false. it will success

Error message

Additional context