@yll10243/vite-plugin-unplugin-css
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

判断数据是否为空

使用vite.config.ts中

  • 引入
import myVitePlugin from '@yll10243/vite-plugin-unplugin-css';
  • 使用element-plus
myVitePlugin({
      resolves: [{
        libraryName: 'element-plus', //第三方的模板
        ensureStyleFile: true, //
        esModule: true, //非css后缀需开启,默认false
        resolveStyle: (name) => {
          return `element-plus/theme-chalk/${name}.css`
        },
        libraryNameChangeCase: "paramCase", //camelCase |  capitalCase |  constantCase | dotCase |  headerCase |  noCase |  paramCase |  pascalCase |  pathCase |  sentenceCase | snakeCase
        // base: 'element-plus/theme-chalk/base.css', //全局的css样式,可以放在main.ts(js)中引入,防止多次重复引入
      }]
})
  • ant-design-vue
myVitePlugin({
      resolves: [
        {
            ensureStyleFile: true,
            libraryName: 'ant-design-vue',
            esModule: true,
            resolveStyle: (name) => {
                return `ant-design-vue/es/${name}/style/index`
            },
        }
    ]
})

  • antd
myVitePlugin({
      resolves: [
        {
            libraryName: 'antd',
            esModule: true,
            resolveStyle: (name) => {
                return `antd/es/${name}/style/index`
            }    
        },
    ]
})
  • vant
myVitePlugin({
      resolves: [
       {
            libraryName: 'vant',
            esModule: true,
            resolveStyle: (name) => {
                return `vant/es/${name}/style`
            },
        }
    ]
})

  • 其它的按照实际要求进行扩展

Readme

Keywords

none

Package Sidebar

Install

npm i @yll10243/vite-plugin-unplugin-css

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

106 kB

Total Files

10

Last publish

Collaborators

  • yll10243