@vxecli/import-vite-plugin-style-import
v1.0.4
Published
vxe-table 按需加载插件,使用 vite-plugin-style-import
Downloads
35
Readme
@vxecli/import-vite-plugin-style-import
用于 Vxe 系组件中使用 vite-plugin-style-import 来按需加载
Insert
npm install vite-plugin-style-import @vxecli/import-vite-plugin-style-import
Use
vite
修改文件 vite.config
// ...
import { createStyleImportPlugin } from 'vite-plugin-style-import'
import { VxeResolve } from '@vxecli/import-vite-plugin-style-import'
export default defineConfig({
plugins: [
// ...,
createStyleImportPlugin({
resolves: [
VxeResolve({
libraryName: 'vxe-table'
// importStyle: true
}),
VxeResolve({
libraryName: 'vxe-pc-ui'
// importStyle: true
})
]
})
]
})
License
MIT © 2017-present, Xu Liangzhan