File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 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>({
153153 if ( moduleOptions . editorSupport || moduleOptions . addTwUtil || isNuxt2 ( ) ) {
154154 const editorSupportConfig = resolveEditorSupportConfig ( moduleOptions . editorSupport )
155155
156- if ( editorSupportConfig . autocompleteUtil || moduleOptions . addTwUtil ) {
156+ if ( ( editorSupportConfig . autocompleteUtil || moduleOptions . addTwUtil ) && ! isNuxt2 ( ) ) {
157157 addImports ( {
158158 name : 'autocompleteUtil' ,
159159 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']
6767
6868 if ( Array . isArray ( nuxt . options . _layers ) && nuxt . options . _layers . length > 1 ) {
6969 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 [ ] ] > => ( [
7171 await resolveConfigPath ( layer ?. config ?. tailwindcss ?. configPath || join ( layer . cwd , 'tailwind.config' ) ) ,
7272 resolveContentPaths ( layer ?. config ?. srcDir || layer . cwd , defu ( layer . config , nuxt . options ) as typeof nuxt . options )
7373 ] ) ) )
7474
7575 layerPaths . forEach ( ( [ configPaths , contentPaths ] ) => {
76- mainPaths [ 0 ] . push ( ...configPaths )
77- mainPaths [ 1 ] . push ( ...contentPaths )
76+ mainPaths [ 0 ] . unshift ( ...configPaths )
77+ mainPaths [ 1 ] . unshift ( ...contentPaths )
7878 } )
7979 }
8080
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export type EditorSupportConfig = {
5353 /**
5454 * Enable utility to write Tailwind CSS classes inside strings.
5555 *
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.
5757 *
5858 * ```json
5959 * {
You can’t perform that action at this time.
0 commit comments