File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ export default defineNuxtModule<ModuleOptions>({
153
153
if ( moduleOptions . editorSupport || moduleOptions . addTwUtil || isNuxt2 ( ) ) {
154
154
const editorSupportConfig = resolveEditorSupportConfig ( moduleOptions . editorSupport )
155
155
156
- if ( editorSupportConfig . autocompleteUtil || moduleOptions . addTwUtil ) {
156
+ if ( ( editorSupportConfig . autocompleteUtil || moduleOptions . addTwUtil ) && ! isNuxt2 ( ) ) {
157
157
addImports ( {
158
158
name : 'autocompleteUtil' ,
159
159
from : resolve ( './runtime/utils' ) ,
Original file line number Diff line number Diff line change @@ -67,14 +67,14 @@ export const resolveModulePaths = async (configPath: ModuleOptions['configPath']
67
67
68
68
if ( Array . isArray ( nuxt . options . _layers ) && nuxt . options . _layers . length > 1 ) {
69
69
const layerPaths = await Promise . all (
70
- nuxt . options . _layers . slice ( 1 ) . reverse ( ) . map ( async ( layer ) : Promise < [ string [ ] , string [ ] ] > => ( [
70
+ nuxt . options . _layers . slice ( 1 ) . map ( async ( layer ) : Promise < [ string [ ] , string [ ] ] > => ( [
71
71
await resolveConfigPath ( layer ?. config ?. tailwindcss ?. configPath || join ( layer . cwd , 'tailwind.config' ) ) ,
72
72
resolveContentPaths ( layer ?. config ?. srcDir || layer . cwd , defu ( layer . config , nuxt . options ) as typeof nuxt . options )
73
73
] ) ) )
74
74
75
75
layerPaths . forEach ( ( [ configPaths , contentPaths ] ) => {
76
- mainPaths [ 0 ] . push ( ...configPaths )
77
- mainPaths [ 1 ] . push ( ...contentPaths )
76
+ mainPaths [ 0 ] . unshift ( ...configPaths )
77
+ mainPaths [ 1 ] . unshift ( ...contentPaths )
78
78
} )
79
79
}
80
80
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export type EditorSupportConfig = {
53
53
/**
54
54
* Enable utility to write Tailwind CSS classes inside strings.
55
55
*
56
- * You will need to update `.vscode/settings.json` based on this value.
56
+ * You will need to update `.vscode/settings.json` based on this value. This works only for Nuxt 3 or Nuxt 2 with Bridge.
57
57
*
58
58
* ```json
59
59
* {
You can’t perform that action at this time.
0 commit comments