-
Notifications
You must be signed in to change notification settings - Fork 183
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
Can't resolve #build/tailwind.config/* #680
Comments
Can't see anything that leads to this in the changeset: v6.6.7...v6.6.8 did anythign else change? e.g. building/packaging? |
The resolved Is it possible to get a replication over stackblitz please? https://stackblitz.com/github/nuxt/starter/tree/v2-stackblitz |
Would fit indeed to the error, but 6.6.6 and 6.6.7 are working. Indeed strange, I'm trying to create a replica on stackblitz. |
I'm not able to reproduce it somehow on stacklitz, maybe it is related to our monorepo setup (pnpm) which hoists all the nuxt speicifc things, but maybe it's missing something... still strange that it works with will try to followup on this later |
Sure. Here to help - let me know 🙂 |
I finally was able to reproduce the issue, it's not realted to pnpm, it happens when I import e.g. theme from i created a simple helpers/test.ts:
and imported it inside pages/index.vue to do just a simple console log on mounted of "blub()". then I get the same erros:
|
Reduced it to the minimum changes: https://stackblitz.com/edit/github-ruub1l-ssfjxw?file=README.md |
Okay! I'm able to now find the issue. While I plan a fix for this ASAP, if you wish to stay on the latest version, the workaround for this, as in the docs, is to create a module and add it before import { addTemplate } from '@nuxt/kit'
export default function () {
this.nuxt.hook('tailwindcss:resolvedConfig', (c) =>
addTemplate({
filename: 'tailwind.config.cjs',
getContents: () => `module.exports = ${JSON.stringify(c)}`,
write: true
})
)
} |
Version
@nuxtjs/tailwindcss: 6.7.0
nuxt: v2.16.3
Steps to reproduce
installing @nuxtjs/tailwindcss 6.7.0 or any version abover 6.6.7 and run nuxt build on a nuxt2 project, it results into build errors like the following:
Module not found: Error: Can't resolve '#build/tailwind.config/variants.mjs' in '/home/simon/Dev/hokify/hokify-server/services/admin-app/admin-interface/.nuxt/tailwind.config'
it throws errors about each file mentioned inside of tailwind.config/index.mjs
What is Expected?
should build like < 6.6.8
What is actually happening?
throws errors during build that it cannot find #build/tailwind.config/...
the files are there, but not sure abuot "#build" itself?
The text was updated successfully, but these errors were encountered: