Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant