Skip to content

After install can't build imported module #60

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

Closed
mkrajewski90 opened this issue Jul 4, 2021 · 1 comment
Closed

After install can't build imported module #60

mkrajewski90 opened this issue Jul 4, 2021 · 1 comment

Comments

@mkrajewski90
Copy link

mkrajewski90 commented Jul 4, 2021

Hey,

I have two problems.

  1. When run ./bin/rails tailwindcss:install I have

Thor::Error: The file /Users/XXX/XXX/XXX/postcss.config.js does not appear to exist

I fixed this by adding manually postcss.config.js file in the root document with:

module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  }
}

I'm not sure if that's correct approach and not destroy the build.

  1. When refresh a page I receive all the time:
macroelements_type_controller.js:4 Uncaught Error: Module build failed: ModuleBuildError: Module build failed: 
@import "tailwindcss/base";
^
      File to import not found or unreadable: tailwindcss/base.
      in /Users/XXX/XXX/XXX/app/javascript/stylesheets/application.scss (line 1, column 1)

I can't find the reason of this bug. Any ideas how to fix this?

PS: macroelements_type_controller.js is a stimulus class and there is no connection between tailwind and this controller.

@dhh
Copy link
Member

dhh commented Aug 18, 2021

We've dropped webpack support from this gem. It's now exclusively intended for use with sprockets. Will introduce another, easy way to add TW to a webpack setup. But doesn't make sense to share it in the same gem.

@dhh dhh closed this as completed Aug 18, 2021
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

No branches or pull requests

2 participants