You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello people, I have refactored my own project yesterday. Also, I moved to use Tailwind CSS with Emotion.js. Based on this example, I use tailwindcss.macro for using macros function to inject tailwind CSS attribute into the styled component. So that you can have the full benefits of Emotion.js.
Regarding next.config.js that I have set fs: "empty" because of tailwindcss.macro need to access fs. but it'll be fine and you can see this old issue about fs in #2734
Please review this PR and add some comments.
Cheers!
I have an issue here. I get the following message in VSCode on line 4 of index.js - import tw from "tailwind.macro".
module "/home/akshaj/projects_js/with-tailwindcss-emotion-app/node_modules/tailwind.macro/macro"
Could not find a declaration file for module 'tailwind.macro'. '/home/akshaj/projects_js/with-tailwindcss-emotion-app/node_modules/tailwind.macro/macro.js' implicitly has an 'any' type.
Try `npm install @types/tailwind.macro` if it exists or add a new declaration (.d.ts) file containing `declare module 'tailwind.macro';`ts(7016)
It means you have to add types for the mentioned packages, the example is not using TypeScript so if you add TypeScript and there are packages that don't include types, you have to install them.
vercel
locked as resolved and limited conversation to collaborators
Jan 31, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
4 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello people, I have refactored my own project yesterday. Also, I moved to use Tailwind CSS with Emotion.js. Based on this example, I use tailwindcss.macro for using macros function to inject tailwind CSS attribute into the styled component. So that you can have the full benefits of Emotion.js.
Regarding
next.config.js
that I have setfs: "empty"
because oftailwindcss.macro
need to accessfs
. but it'll be fine and you can see this old issue aboutfs
in #2734Please review this PR and add some comments.
Cheers!