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

Webpacker support #6

Open
kylefox opened this issue Jul 24, 2018 · 8 comments
Open

Webpacker support #6

kylefox opened this issue Jul 24, 2018 · 8 comments

Comments

@kylefox
Copy link
Collaborator

kylefox commented Jul 24, 2018

It'd be nice to use this library with Webpacker in addition to the asset pipeline.

@trnthanhtu
Copy link

how could i use it together with webpacker?
I'm looking the way to implement it.

@kylefox
Copy link
Collaborator Author

kylefox commented Aug 22, 2018

@trnthanhtu Unfortunately it's currently not supported by this gem. You'll need to do it manually if you require webpacker support — or better yet, submit a pull request 😉

@acprsadmin
Copy link

by manually you mean park the assets in vendor and not use the gem?

@kylefox
Copy link
Collaborator Author

kylefox commented Jan 25, 2019

@acprsadmin You could manually install Trix with yarn and then include it in your app/javascript/packs/application.js or whatever. This gem mainly provides form helpers, which will work regardless of how you install Trix's JS/CSS.

@acprsadmin
Copy link

Ok i parked trix.css in app/assets/stylesheets and trix.js in app/assets/javascripts

//= require trix in application.js
@import "trix"; application.scss

I disabled the gem.

i get this error...
couldn't find file 'trix/banner' with type 'application/javascript'

same thing if i use straight css links in header and script link in bottom of page

any ideas.
is webpacker even worth the hassle in Rails 5.2.2?

@acprsadmin
Copy link

or should it use the trix.scss and trix coffee file under basecamp/trix/assets directly rather than the /dist directory.
what is diff between trix.js and trix-core.js???

@acprsadmin
Copy link

also what is the command to install trix with yarn?

thanks

@kylefox
Copy link
Collaborator Author

kylefox commented Jan 31, 2019

@acprsadmin I'm not sure why you're encountering those errors. Just to clarify, if you manually added the files to app/assets/stylesheets and app/assets/javascripts as you mentioned here, then you're using the asset pipeline — not webpacker.

This issue tracker is for bugs and feature requests relating to this gem specifically. If you're running into an issue installing the gem as described in the README, please open a new issue and describe the problem in as much detail as possible.

For other issues relating to Trix (including installation), please refer to the official Trix repo or post questions to Stack Overflow.

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

3 participants