vite-plugin-style-import
vite-plugin-style-import copied to clipboard
A plug-in that imports component library styles on demand.it is fast
* 我的vite版本"vite": "^3.0.7" * 组件库地址:https://react-vant.3lang.dev/ * 一开始这么设置报错,路径不对(蓝色线是多于的): ```ts createStyleImportPlugin({ libs: [ { libraryName: "react-vant", esModule: true, resolveStyle: (name) => { return `react-vant/es/${name}/style/index.css`; }, }, ], }) ``` * 我按照以下配置,但是不生效: ```ts...
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: ```...
![image](https://user-images.githubusercontent.com/23518734/188352699-ad174f15-0b46-4611-88a6-8679c2d28dd3.png) windows 需要 改成 vant/es/... mac 需要写成 ../es
This package seems not maintained for a long time, here is a similar package https://github.com/liuweiGL/vite-plugin-demand-import
Are you serious?
When using monorepo, the package may be promoted to the node_modules of the root directory, so the exclude configuration will not take effect, causing some packages to fail to find...
![image](https://user-images.githubusercontent.com/43923759/201103929-788d5ccc-4dbb-4ecb-b56e-9cbe734d6ae7.png)
fix zh readme typo
return h(ElTable, { attrs: context.attrs, key: randomKey, }, () => filterChildren) }