Skip to content

Intellisense Not Firing in Files Nested in Project Directories (siblings to the Webpack root) #705

Closed
@cameronsb

Description

@cameronsb

What version of Tailwind CSS IntelliSense are you using?

For example: v0.9.6

What version of Tailwind CSS are you using?

For example: v3.2.4

What package manager are you using?

npm

What operating system are you using?

macOS

Tailwind config

/** @type {import('tailwindcss').Config} */
module.exports = {

    // note: these paths are relative to where the postcss.config.js file is located
    content: [
        './src/admin/js/**/*.js', // all admin JS files
        '../application/views/layouts/**/*.{html,php}', // all admin pages
        '../application/views/pages/**/*.{html,php}', // all admin pages
    ],

    theme: {
        extend: {
            colors: {
                transparent: 'transparent',
                current: 'currentColor',
            },
        },
    },
    plugins: [],
    corePlugins: {
        preflight: false, // disable tailwind's default styles
    },
};

VS Code settings

{
   ...

    "files.associations": {
        "*.css": "tailwindcss"
    },
    "tailwindCSS.emmetCompletions": true,
    "editor.quickSuggestions": {
        "strings": true
    }
}

Reproduction URL

I'll see if I can get this up.

Describe your issue

We have a CodeIgniter instance running, and there is also a Webpack folder where we house all of our build configs.

The folder structure looks like this (with many folders removed here for brevity):

- local-installer
- application
    ...
    - views
        ...
        - pages
            - example.php
...
- webpack
    ...
    - src
        - admin
            ...
            - tailwind
                ...
                - tailwind.config.js
    - webpack.config.js
    - postcss.config.js

My main issue is that I can't get Intellisense to work on any files in application/views. My guess is that it's too far-removed from the directory where Webpack is operating from. I've recently tried to pull all of the configs out into the project root and update all of the relative paths for the build to work, but that didn't help either.

I'm wondering if there's anything I'm doing wrong, or if this is simply out of the scope of the extension's capabilities.

I have been touting Tailwind's benefits to our organization and even started to build out components, but if I can't get Intellisense working in our primary directory, we may need to abandon the idea for now :(

Let me know if you need any extra information. Thank you.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions