Closed mgcrea closed 2 years ago
Describe the bug
Can't build my vite app using vite-plugin-imp as it tries to rewrite both style and js imports. In my use case, I only want to add extra less imports and do not touch the JS imports (and let rollup do the tree shaking).
{ libName: '@mgcrea/antd-extended', // libDirectory: 'lib/esm', // camel2DashComponentName: false, style: (name) => { return [`antd/es/${name}/style/index.less`, `@mgcrea/antd-extended/lib/esm/${name}/style/index.less`]; }, },
[vite]: Rollup failed to resolve import "@mgcrea/antd-extended/es/button" from "src/screens/LoginScreen.tsx".
Library Info(please complete the following information):
To Reproduce
npx vite build
Looks like replaceOldImport might be a possible fix if it did work for the build command as well.
replaceOldImport
I will make replaceOldImport work for build command as well to solve this situation.
Thanks for the quick fix!
Describe the bug
Can't build my vite app using vite-plugin-imp as it tries to rewrite both style and js imports. In my use case, I only want to add extra less imports and do not touch the JS imports (and let rollup do the tree shaking).
Library Info(please complete the following information):
To Reproduce
Looks like
replaceOldImport
might be a possible fix if it did work for the build command as well.