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

fix: nested props resolution #616

Merged
merged 2 commits into from
Feb 17, 2023
Merged

fix: nested props resolution #616

merged 2 commits into from
Feb 17, 2023

Conversation

ineshbose
Copy link
Collaborator

src/module.ts Outdated Show resolved Hide resolved
@atinux
Copy link
Collaborator

atinux commented Feb 17, 2023

Is it good for you @ineshbose ?

@ineshbose
Copy link
Collaborator Author

It works, but I hit the dynamic import occasionally (1 out of 10 times maybe) but write: true for base config gives no error - any suggestion on that? If you don't encounter it, perhaps I may be testing it wrong. @atinux

@atinux
Copy link
Collaborator

atinux commented Feb 17, 2023

What is the example where you get the error? if write: true works for you with no errors we can add it.

@ineshbose
Copy link
Collaborator Author

ineshbose commented Feb 17, 2023

If you copy the linked issue's reproduction's app.vue into say, playground/pages/nested.vue:

<script setup>
import colors from '#tailwind-config/theme/colors';
</script>

<template>
  <div>
    {{ JSON.stringify(colors, null, 2) }}
  </div>
</template>

On starting the playground, either index.vue gives dynamic import error, or nested.vue would not be resolved without this. Sorry but I'm thinking I can brainstorm a bit more into having the base .mjs with write: true but have imports to be from #build/tailwind.config rather than relative ./tailwind.config/...

I'll share a screen recording

@ineshbose
Copy link
Collaborator Author

module.ts.-.nuxt-tailwindcss-module.Codespaces.-.Visual.Studio.Code.-.Google.Chrome.2023-02-17.11-20-05.mp4

@atinux

Happens once after boot I think and a refresh fixes it, but sharing with you (the nginx error was codespaces)

Copy link
Collaborator

atinux commented Feb 17, 2023

Do you have the error locally and not on github.dev?

@ineshbose
Copy link
Collaborator Author

Yes the error happens locally too, but I've added the suggestion #616 (comment) that should fix it

@atinux atinux merged commit aa314fb into nuxt-modules:main Feb 17, 2023
Copy link
Collaborator

atinux commented Feb 17, 2023

Released in v6.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants