Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose config with nested props not resolving path #603

Closed
ineshbose opened this issue Jan 26, 2023 · 2 comments
Closed

Expose config with nested props not resolving path #603

ineshbose opened this issue Jan 26, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ineshbose
Copy link
Collaborator

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 ineshbose added the bug Something isn't working label Jan 26, 2023
@ineshbose
Copy link
Collaborator Author

ineshbose commented Jan 26, 2023

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
Copy link
Collaborator Author

ineshbose commented Jan 27, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant