Expose config with nested props not resolving path

This issue has been tracked since 2023-01-26.

Version

@nuxtjs/tailwindcss: 6.3.0
nuxt: 3.1.1

Reproduction Link

https://stackblitz.com/edit/github-nzmdqj?file=app.vue

Steps to reproduce

Based on the feature added by #583, import for properties should work using #tailwind-config, but as one concern was raised in #583 (comment):

Also want to confirm about #tailwind-config/* pointing to .nuxt/tailwind.config/* rather than .nuxt/tailwind.config.mjs (for eg, test import { _slate } from '#tailwind-config/theme/colors' in playground/pages/index.vue and see if you get an error).

I'm hitting issues in importing properties.

What is Expected?

color to be imported.

What is actually happening?

#tailwind-config/theme/colors resolves to .nuxt/tailwind.config.mjs/theme/colors

ineshbose wrote this answer on 2023-01-28

I can create a PR ASAP if I could be advised on how to fix this please!
(I have already tried nuxt.options.alias['#tailwind-config/*'] but it doesn't help)

ineshbose wrote this answer on 2023-01-28

Need to change tailwind.config.mjs to be tailwind.config/index.mjs and update the alias accordingly. But that breaks import of just #tailwind-config..

This is really helpful (after renaming the file to tailwind.config/index.mjs, but another issue presented is that the .cjs does not have an export named default (which is why I chose to keep the filename tailwind.config.mjs).

nuxt.options.alias['#tailwind-config'] = dirname(template.dst)
More Details About Repo
Owner Name nuxt-modules
Repo Name tailwindcss
Full Name nuxt-modules/tailwindcss
Language TypeScript
Created Date 2019-04-04
Updated Date 2023-03-29
Star Count 1285
Watcher Count 12
Fork Count 157
Issue Count 57

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date