Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
This repository was 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

@yuArimer

Description

@yuArimer

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)并没有被打印

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions