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

Cannot resolve module 'head' error when importing Tailwind #25

Closed
khromov opened this issue Nov 10, 2020 · 7 comments · Fixed by #26
Closed

Cannot resolve module 'head' error when importing Tailwind #25

khromov opened this issue Nov 10, 2020 · 7 comments · Fixed by #26
Labels
✘ bug Something isn't working

Comments

@khromov
Copy link

khromov commented Nov 10, 2020

I'm trying to add Tailwind to app.tsx:

app.tsx

import "https://unpkg.com/tailwindcss@1.9.1/dist/tailwind.min.css"

but I'm getting:

ERROR TypeError: Cannot resolve module "file:///home/k/-/deno.land/x/aleph/head.js" from "file:///home/k/GitHub/aleph-operator-lookup/.aleph/development.es2018/-/unpkg.com/tailwindcss@1.9.0/dist/tailwind.css.js".
    at file:///home/k/GitHub/aleph-operator-lookup/.aleph/development.es2018/-/unpkg.com/tailwindcss@1.9.0/dist/tailwind.css.js:1:0
WARN page '/-/deno.land/x/aleph/head.js' not found
@khromov khromov changed the title Error when importing Tailwind Cannot resolve module 'head' error when importing Tailwind Nov 10, 2020
@buttercubz
Copy link

@khromov import css in style/index.less

@khromov
Copy link
Author

khromov commented Nov 10, 2020

@buttercubz Thanks, it works as a workaround, but I was under the impression that with module import you could have it bundled with your JS (which is what I want), not as an external CSS import.

@shadowtime2000
Copy link
Member

@khromov I believe that bundling was on the v0.3.0 roadmap (#5) so you may be able to do something like that after.

@ije ije added the ✘ bug Something isn't working label Nov 10, 2020
@ije
Copy link
Member

ije commented Nov 10, 2020

i think this is a bug, i will figure it out. and i'm considering a pugin for tailwind to support tree-sharking and other features.

@shadowtime2000
Copy link
Member

@ije How exactly would that work? Something like CSS modules?

@ije
Copy link
Member

ije commented Nov 11, 2020

@ije
Copy link
Member

ije commented Nov 12, 2020

fixed

mohsenkhanpour pushed a commit to mohsenkhanpour/aleph.js that referenced this issue Jan 29, 2021
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

Successfully merging a pull request may close this issue.

4 participants