File tree Expand file tree Collapse file tree 12 files changed +158
-20
lines changed Expand file tree Collapse file tree 12 files changed +158
-20
lines changed Original file line number Diff line number Diff line change 20
20
"css-loader" : " ^6.5.1" ,
21
21
"pug" : " ^3.0.2" ,
22
22
"pug-plain-loader" : " ^1.1.0" ,
23
- "sass-loader" : " ^12.4 .0" ,
23
+ "sass-loader" : " ^12.6 .0" ,
24
24
"url-loader" : " ^4.1.1" ,
25
+ "vite-plugin-inspect" : " ^0.4.3" ,
25
26
"vue-style-loader" : " ^4.1.3" ,
26
27
"vuetify-loader" : " ^2.0.0-alpha.1" ,
27
28
"webpack-cli" : " ^4.9.1" ,
Original file line number Diff line number Diff line change
1
+ $color-pack : false;
2
+ $alert-padding : 24px ;
3
+ $utilities : false;
Original file line number Diff line number Diff line change 1
1
import vue from '@vitejs/plugin-vue'
2
2
import vuetify from '@vuetify/vite-plugin'
3
3
import path from 'path'
4
+ import Inspect from 'vite-plugin-inspect'
4
5
5
6
export default {
6
7
root : path . resolve ( __dirname , 'src' ) ,
@@ -17,13 +18,26 @@ export default {
17
18
} )
18
19
}
19
20
}
20
- }
21
+ } ,
22
+ // Inspect(),
21
23
] ,
22
24
build : {
23
25
outDir : '../dist' ,
24
26
emptyOutDir : true ,
25
27
rollupOptions : {
26
28
input : 'index.vite.html'
27
29
}
30
+ } ,
31
+ resolve : {
32
+ alias : {
33
+ '@' : __dirname
34
+ } ,
35
+ } ,
36
+ css : {
37
+ preprocessorOptions : {
38
+ sass : {
39
+ // additionalData: `@forward '@/src/_variables'\n`,
40
+ }
41
+ }
28
42
}
29
43
}
Original file line number Diff line number Diff line change @@ -10,7 +10,19 @@ function sassLoaderOptions (indentedSyntax = false) {
10
10
return {
11
11
// implementation: require('sass'),
12
12
// additionalData: `@import "~@/_variables.scss"` + (indentedSyntax ? '' : ';'),
13
- sassOptions : { indentedSyntax } ,
13
+ api : 'modern' ,
14
+ sassOptions : {
15
+ indentedSyntax,
16
+ // importers: [{
17
+ // canonicalize (url) {
18
+ // console.log(url)
19
+ // return new URL(url)
20
+ // },
21
+ // load (url) {
22
+ // console.log(url)
23
+ // }
24
+ // }]
25
+ } ,
14
26
}
15
27
}
16
28
Original file line number Diff line number Diff line change 18
18
"@vue/compiler-sfc" : " ^3.2.24" ,
19
19
"conventional-changelog-conventionalcommits" : " ^4.6.1" ,
20
20
"lerna" : " ^3.22.1" ,
21
- "sass" : " ^1.44.0 " ,
21
+ "sass" : " ^1.49.9 " ,
22
22
"typescript" : " ^4.4.2" ,
23
23
"vite" : " ^2.7.1" ,
24
24
"vue" : " ^3.2.19" ,
25
25
"vue-loader" : " ^16.5.0" ,
26
- "vuetify" : " ^3.0.0-alpha.11 " ,
26
+ "vuetify" : " npm:@vuetify/nightly@next " ,
27
27
"webpack" : " ^5.65.0"
28
28
}
29
29
}
Original file line number Diff line number Diff line change 1
1
export interface Options {
2
2
autoImport ?: importPluginOptions ,
3
- styles ?: true | 'none' | 'expose' ,
3
+ styles ?: true | 'none' | 'expose' | 'sass' ,
4
4
/** @internal Only for testing */
5
5
stylesTimeout ?: number
6
6
}
Original file line number Diff line number Diff line change @@ -64,3 +64,14 @@ import { createVuetify } from 'vuetify'
64
64
65
65
export default createVuetify ()
66
66
```
67
+
68
+ ### Import sass from source
69
+ Vuetify 3 uses precompiled css by default, these imports can optionally be modified to point to sass files instead:
70
+
71
+ ``` js
72
+ // vite.config.js
73
+ plugins: [
74
+ vue (),
75
+ vuetify ({ styles: ' sass' }),
76
+ ]
77
+ ```
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export = function vuetify (_options: Options = {}) {
16
16
if ( options . autoImport ) {
17
17
plugins . push ( importPlugin ( ) )
18
18
}
19
- if ( options . styles === 'none' || options . styles === 'expose' ) {
19
+ if ( options . styles === 'none' || options . styles === 'expose' || options . styles === 'sass' ) {
20
20
plugins . push ( stylesPlugin ( options ) )
21
21
}
22
22
Original file line number Diff line number Diff line change @@ -132,6 +132,8 @@ export function stylesPlugin (options: Options): PluginOption {
132
132
) {
133
133
if ( options . styles === 'none' ) {
134
134
return '\0__void__'
135
+ } else if ( options . styles === 'sass' ) {
136
+ return source . replace ( / \. c s s $ / , '.sass' )
135
137
} else if ( options . styles === 'expose' ) {
136
138
awaitResolve ( )
137
139
Original file line number Diff line number Diff line change @@ -111,5 +111,19 @@ import { createVuetify } from 'vuetify'
111
111
export default createVuetify ()
112
112
```
113
113
114
+ ### Import sass from source
115
+ Vuetify 3 uses precompiled css by default, these imports can optionally be modified to point to sass files instead:
116
+
117
+ ``` js
118
+ // webpack.config.js
119
+ const { VuetifyLoaderPlugin } = require (' vuetify-loader' )
120
+
121
+ module .exports = {
122
+ plugins: [
123
+ new VuetifyLoaderPlugin ({ styles: ' sass' }),
124
+ ],
125
+ }
126
+ ```
127
+
114
128
## Progressive images
115
129
Coming soon...
You can’t perform that action at this time.
0 commit comments