onebay / vite-plugin-imp

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

Can't transform import "lodash" #78

Closed tjx666 closed 1 year ago

tjx666 commented 1 year ago

Describe the bug

image

Can't transform import "lodash"

vitePluginImp({
    libList: [
        {
            libName: '@xxx/yyy-antd',
            libDirectory: 'es',
            style: (name) => `@xxx/yyy-antd/es/${name}/style/css.js`,
        },
    ],
}),

Libarary Info(please complete the following information):

"vite-plugin-imp": "^2.3.1",
"lodash": "4.17.21"

To Reproduce

This happen in my company project, which is a large vite + vu2 project. Two package will use this plugin to tramsform import:

  1. lodash
  2. @xxx/yyy-antd

Expected behavior No this warning, or provide an option to supress this warning.

psaren commented 1 year ago

Please provide a minimal repo to reproduce this issue.

tjx666 commented 1 year ago

@psaren When make this warn, should also console.log the file this plugin are transforming

tjx666 commented 1 year ago

After upgrade rollup and relatived plugins, this issue disapear