Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

The newly created vite project introduces its own UI component library and uses vite plugin style plugin to import styles on demand, but it does not take effect? #94

Open
yuArimer opened this issue Sep 9, 2022 · 0 comments

Comments

@yuArimer
Copy link

yuArimer commented Sep 9, 2022

The newly created vite project introduces its own UI component library and uses vite plugin style plugin to import styles on demand, but it does not take effect?
example:

createStyleImportPlugin({
        libs: [{
          libraryName: 'soui-biz', // 自己写的一个UI组件库
          esModule: true,
          libraryNameChangeCase: 'pascalCase',
          ensureStyleFile: true,
          resolveStyle: (name: any) => {
            console.log(name);
            return `soui-biz/dist/packages/${name}/index.less`;
          },
        }]
      })

而且npm run dev 的时候console.log(name)并没有被打印

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

1 participant