@sdata/web-vue-auto-import-resolver 3.25.0 → 3.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,10 +16,10 @@ pnpm add -D @sdata/web-vue-auto-import-resolver unplugin-vue-components
|
|
|
16
16
|
## Vite(推荐)
|
|
17
17
|
|
|
18
18
|
```ts
|
|
19
|
-
import {
|
|
19
|
+
import { SdDesignResolver, createSdDesignVitePlugin } from '@sdata/web-vue-auto-import-resolver';
|
|
20
20
|
import vue from '@vitejs/plugin-vue';
|
|
21
21
|
import Components from 'unplugin-vue-components/vite';
|
|
22
|
-
import {
|
|
22
|
+
import { defineConfig } from 'vite';
|
|
23
23
|
|
|
24
24
|
export default defineConfig({
|
|
25
25
|
plugins: [
|
|
@@ -39,8 +39,8 @@ export default defineConfig({
|
|
|
39
39
|
`createSdDesignVitePlugin()` 实际上就是在 `config` hook 里调用了 `createSdDesignScssImporter()` 并注入到 `css.preprocessorOptions.scss.importers`。如果你不想用 Vite 插件,或者需要在非 Vite 环境下使用,可以手动配置:
|
|
40
40
|
|
|
41
41
|
```ts
|
|
42
|
-
import { defineConfig } from 'vite';
|
|
43
42
|
import { createSdDesignScssImporter } from '@sdata/web-vue-auto-import-resolver';
|
|
43
|
+
import { defineConfig } from 'vite';
|
|
44
44
|
|
|
45
45
|
export default defineConfig({
|
|
46
46
|
css: {
|
package/package.json
CHANGED